Here you'll find the libraries and examples you need to work with a Motorola Razr on ICS (Ice Cream Sandwich). Look for " Motorola Handset SDK Addons " and " Motorola ICS R2 ".
The Addon comes with two examples, you have to study them yourself, there is no actual API-documentation out there, but a proper explanation how the API works you'll find here.
I can assure you the API-examples work relatively fine with TI's CC2540DVK Keyfob and a Motorola Razr (XT910). All you have to do is to take care about to use valid UUID's!
...Update...
Fresh start in Eclipse (Indigo) with Android SDK (v20) and Motorola ICS R2 sample:
- In Package Explorer (right click) ==> Import ==> Existing Android Code Into Workspace
- Root Directory: ...\Motorola_ICS_R2\samples\Motorola_BLE_profile_sample (copy into workspace)
- On Project (right click) ==> Properties ==> Java Build Path/Libraries ==> remove ALL jar's even the Android Libs
- In Java Build Path/Libraries ==> Add External Jars: ...\Motorola_ICS_R2\libs\BluetoothGatt.jar & BluetoothGattService.jar
- On Project (right click) ==> Android Tools ==> Fix project properties
Now choose an existing primary service of your sensor device, i.e. 0x180A (Device Information):
public static final ParcelUuid HRM = ParcelUuid .fromString("0000180A-0000-1000-8000-00805f9b34fb");
Build and run
It depends on your sensor device how far you get with the sample, but you should at least get a connection and get some characteristics. See the LogCat output.
Regards,
PeterVanPansen