Search code examples
javaandroidxmlbluetooth-lowenergyandroid-bluetooth

How to use BLE specification XML service files?


The link BLE device information XML is a BLE service XML file copied from the original GATT specification files. Can I and how can I use this XML file for my project on Android Studio in Java? I am new to this and am wondering what is the purpose of this file then.

I tried implementing in layouts which gave a lot of errors. I have no idea where else to put it or how i would implement this.


Solution

  • It just contains the specification of the characteristics of that service in a structured way (xml). You don't need to programmatically import/use it in your code. If you want to read some characteristic, you can just do so directly using the defined service uuid and characteristic uuid.

    The xml file could be of interest when one wants to create a GATT server with auto-populated characteristics with the correct properties using some tool that can consume such xml files.