I am trying to write an app for Android P using the Bluetooth HID device profile service to be used as a Bluetooth keyboard. According to the documentation I am supposed to use
You can have a look at this https://github.com/kshoji/BLE-HID-Peripheral-for-Android . I was able to build a bluetooth keyboard out of this.