Android BluetoothProfile之HID

BluetoothInputDevice:

 HID(Human Interface Device)人机接口设备。

       对于BluetoothHidService的建立过程和A2dp的流程有点不一样。得到BluetoothInputDevice代理客户端的过程是一样的,但是BluetoothHidService的启动却不是直接加入到ServiceManager中,而是通过startService的方式启动, 启动BluetoothHidService的地方有几个地方:

(MTK平台)

./mediatek/source/packages/Bluetooth/profiles/hid/src/com/mediatek/bluetooth/hid/BluetoothHidAlert.java:151:

this.bindService(newIntent(BluetoothHidAlert.this,BluetoothHidService.class), mHidServerNotifyConn,Context.BIND_AUTO_CREATE);

 

./mediatek/source/packages/Bluetooth/profiles/hid/src/com/mediatek/bluetooth/hid/BluetoothHidActivity.java:298:                            this.startService(newIntent(BluetoothHidActivity.this,BluetoothHidService.class));

 

 

而在android原生代码中,BluetoothHidService并不存在,而是直接由BluetoothService直接来提供(所在在原生的代码中流程相比a2dp,最后代理客户端调用的是BluetoothService这个服务)。

 


你可能感兴趣的:(Android BluetoothProfile之HID)