Connect to bluetooth headset in android

一曲冷凌霜 提交于 2019-12-06 16:33:19

You cannot do call the RFCOMM api to connect to the headset. It is meant to connect to the SPP profile , the Headset will use the HS/HFP Profiles. Using differnt UUIDs also on the RFCOMM apis will not solve the problem.

Basically this Headset level profile connection is done internally by Android (and there are no application level access to establish connections) Applications can only get state of the conenctions - see the BluetoothHeadset Class

the current behavior is the correct recommended behavior , i.e. the headset should connect to the Phone , so the phone should be on before the headset is turned on. It is recommended as such for good user experience and predictability, if both devices try to connect to each other randomly it will not get connected.

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