Android 傳統藍牙配對連接斷開 附demo

簡單的描述下分享給大家個demo:

網上找了一大堆,剛開始配對是沒問題的,但是斷開連接和連接設備就出現很多報錯,用的是

BluetoothSocket.connect,發現完全不是同一個方向,一直報錯getBluetoothService() called with no BluetoothManagerCallback

read failed, socket might closed or timeout, read ret: -1

連接和斷開的藍牙關鍵類應該是 BluetoothProfile。

demo鏈接://download.csdn.net/download/Roshen_android/12194995

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章