这个问题可能是由于Android操作系统将Wear手表误报为蓝牙耳机而导致的。要解决这个问题,您可以在应用程序中使用BluetoothAdapter的API来检查已连接的蓝牙设备列表并识别Wear手表。以下是这个过程的示例代码:
BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
Set
for (BluetoothDevice device : pairedDevices) { if (device.getBluetoothClass().getMajorDeviceClass() == BluetoothClass.Device.Major.WEARABLE) { // Found an Android Wear device } }
这里,我们将getMajorDeviceClass()与Android Wear设备的主要设备分类进行比较。如果两者都匹配,则确认已连接的设备是Wear手表。
希望这个解决方案能够帮助您解决这个问题。