public class BluetoothHeadsetBroadcastReceiver extends BroadcastReceiver { public BluetoothHeadsetBroadcastReceiver() { } public void onReceive(Context context, Intent intent) { String action = intent.getAction(); int state; BluetoothDevice device; if (action.equals("android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED")) { state = intent.
Android bluetooth设备状态监听
最新推荐文章于 2024-07-25 16:11:30 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)