Android connect to a paired bluetooth headset

后端 未结 4 1230
青春惊慌失措
青春惊慌失措 2020-12-30 17:50

I want to simulate the action of going throgh Settings->Wireless->Bluetooth and connect a paired bluetooth headset programmatically. I\'ve done some search in Stackoverflow

4条回答
  •  粉色の甜心
    2020-12-30 18:47

    I tried this on Android 4.2 and following line returns null. It was working on 4.1, any ideas ?

    IBinder b = (IBinder) m2.invoke(null, "bluetooth_a2dp");
    

提交回复
热议问题