How can i use the Bluetooth HID Device profile in Android Pie?

做~自己de王妃 提交于 2019-12-04 05:30:26

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.

Currently on pixel the HID device Profile is enabled . Nokia, moto(as mentioned above) and One Plus 5T and 6 as far as i know dont support this profile.

We have created an app which lets you use your phone as a bluetooth mouse and keyboard with this HID device profile. https://play.google.com/store/apps/details?id=com.github.roarappstudio.btkontroller

The code is open sourced at https://github.com/raghavk92/Kontroller. If anyone wants to help in making improvements or contribute to the code they are welcome.

You can also check if your phone supports Bluetooth HID device profile with the app - https://play.google.com/store/apps/details?id=com.rkaneapplabs.bluetooth_hid.bluetoothproxy and let your device manufacturer know if they dont support your device because its part of android pie and should be supported.

There is a semi-official sample code available here: https://github.com/ginkage/wearmouse — actually by Google itself (see https://opensource.google.com/projects/wearmouse).

It is intended for using on Wear OS watches, but has everything you need to use it on a phone as well: proxy class for the profile, a callback class, HID Descriptor example, QoS, callbacks for cases like battery level inquiry from the host, etc.

The app itself is available at Google Play here: https://play.google.com/store/apps/details?id=com.ginkage.wearmouse (the app supports Android 8 as well, by the way, but that only works on watches, not phones).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!