I have one bluetooth 4.0 sensor which send me many services and characteristics, like this draft example:
<service uuid="ServiceUUID" advertise="true">
<description>Test Service</description>
<characteristic uuid="CharacteristUUID" id="test_rate">
<properties read="true" notify = "true"/>
<value length="1" type="hex"></value>
<description>Test Rate</description>
</characteristic>
</service>
I start with android sample BluetoothLEGatt and I want get the characteristic description name for example (Test Rate) dynamically, because in sample they use SampleGattAttributes class to get the description programmatically.
Anyone know how it is possible?
Regards.
For BluetoothGatt dynamic data you have to follow below steps to create the call back methods
Create object of Bluetooth Device, device Address will be the one which you will get after connection
Create BluetoothGatt object
3.Call back implementation
Make sure for the bluetooth permission and other minor variable declaration.