Android 检测是否连接蓝牙耳机
生活随笔
收集整理的這篇文章主要介紹了
Android 检测是否连接蓝牙耳机
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?
前言
?????????歡迎大家我分享和推薦好用的代碼段~~
聲明
?????????歡迎轉載,但請保留文章原始出處:
?????????CSDN:http://www.csdn.net
?????????雨季o莫憂離:http://blog.csdn.net/luckkof
正文
??
private void handleHeadsetStateChange(){if(BluetoothProfile.STATE_CONNECTED == adapter.getProfileConnectionState(BluetoothProfile.HEADSET)){Intent intent = new Intent(Intent.ACTION_HEADSET_PLUG);sendBroadcast(intent);}?
總結
以上是生活随笔為你收集整理的Android 检测是否连接蓝牙耳机的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: nodejs登陆模拟
- 下一篇: 兔子是怎样吃掉狼的