This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

What is the procedure for gathering bluetooth ble Gatt attributes and enable Indications in Android project?

Hi Nordic Developer Zone,

I also encounter a problem with enabling indications in my Android project. I want to enable Indications so I can gather informations store in my bluetooth ble chip. Furthermore, I also read about the CCCD but I don't know if I need to import it to the project in Android studio. finally after testing my ble sensor on the Nordic Master Control app, it works exactly how I wanted to, but I read on the internet that the source is not available for the public. Could you provide me with code examples (from other project of course) for enabling Indications in Android or helpful tips so I could solve this problem. Even recommended books that could help me solve this problem is also welcome.

Best Regards

Parents
  • Have a look at the sample Android project given by Nordic. This is a sample project you can open in Android Studio. The latest version is available on Github.

    The library adds a BLE request queue to do any basic ATT read/write commands. Depending on the number of requests you want to send, you will need this queue to be sure that the BLE stack is not busy when queuing commands.

    Have a look at the enableNotifications function to see how you can write (request) to the CCCD handle, checking the permissions of the characteristic, etc.: github.com/.../BleManager.java

Reply
  • Have a look at the sample Android project given by Nordic. This is a sample project you can open in Android Studio. The latest version is available on Github.

    The library adds a BLE request queue to do any basic ATT read/write commands. Depending on the number of requests you want to send, you will need this queue to be sure that the BLE stack is not busy when queuing commands.

    Have a look at the enableNotifications function to see how you can write (request) to the CCCD handle, checking the permissions of the characteristic, etc.: github.com/.../BleManager.java

Children
No Data