How to talk to a Bluetooth keyboard?

后端 未结 3 1036
南笙
南笙 2020-12-14 13:16

I\'ve written an Android app that connects to a Bluetooth keyboard. It connects through a BT socket to the keyboard and acquires the socket\'s input stream.

         


        
3条回答
  •  攒了一身酷
    2020-12-14 13:57

    All normal Bluetooth keyboards implement the HID profile, which requires an L2CAP connection. Android so far only provides the ability to use RFCOMM connections. You would need to use the Native Development Kit and write your keyboard code in C to using bluez to achieve your goal. Have a look at apps that use the Nintendo WiiMote. The WiiMote also implements the HID profile.

提交回复
热议问题