使用BluetoothManager的getAdapter()方法代替
示例代码:
BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE); BluetoothAdapter bluetoothAdapter = bluetoothManager.getAdapter();
上一篇:bluetoothAdapter.startDiscovery()在没有从通知面板点击蓝牙按钮时无法启动,并且会立即结束。
下一篇:BluetoothandBLEprofiles