我试图用如何断开蓝牙android中
if (bluetoothAdapter != null) {
if(bluetoothAdapter.isEnabled()|bluetoothAdapter.isDiscovering()){
bluetoothAdapter.disable();
bluetoothAdapter.cancelDiscovery();
}
}
断开蓝牙但它不是任何人working.Can建议上的东西,这将是富有成效的我。
什么不起作用?禁用BT /取消发现需要一些时间,因此可能不会立即显示效果,但会在稍后完成。 –
你的if语句应该有逻辑或 - || –