简体   繁体   中英

Finding UUID of a device

I am writing an android app for interfacing a Bluetooth Low Energy Pedometer band with Android phone and reading data from it.My app till now successfully scans the pedometer and lists it with its address. **

BAND
FB:02:52:EE:1C:E1

** But i am not having the UUID for the Pedometer. How can i get UUID for the pedometer.If i enters the sample UUID 00001101-0000-1000-8000-00805f9b34fb

`BluetoothGattService mGattService = mBluetoothGatt.getService(UUID);`

i get mGattService as null.

Is there any way by which i can get UUID for Pedometer

Have a try like;

TelephonyManager tManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String uuid = tManager.getDeviceId();

May it will help you. Thanks!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM