0
我有一部android手机和条码扫描器。要使用扫描仪,我将它与手机配对,但在我的应用程序中,我希望有一点断开扫描仪,所以要做到这一点,我认为一个不成功就足够了。我尝试从here 接受的答案,但它不起作用。也许BluetoothDevice对象不正确?Android如何取消配对蓝牙扫描器
String mac = BluetoothAdapter.getDefaultAdapter().getAddress();
BluetoothDevice bluetoothDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(mac);
其实我一直不明白该怎么把地址getRemoteDevice()方法,所以我把手机蓝牙MAC地址。我应该在那里放置其他地址吗?我将不胜感激任何答案。
预先感谢您
您应该使用远程设备的地址,而不是您自己的地址。 – TJD