我希望我的程序在某些蓝牙设备打开时使用react。所以我想知道是否有每个蓝牙设备的唯一 ID 可用于通过 BluetoothDevice android 类识别蓝牙设备。我无法使用设备名称,因为有很多同名设备: 这是我得到这个名字的方式:
Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();
for (BluetoothDevice bt : pairedDevices) {
String bluetoothDevice = bt.getName();
}
最佳答案
您可以使用 device address :
bt.getAddress();
关于android - 是否有任何蓝牙设备唯一标识,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20659107/