可尝试使用BluetoothAdapter.setName()方法重新设置蓝牙名称。若仍无效,可以尝试使用如下代码:
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); mBluetoothAdapter.setName("My Bluetooth Name");
注意,此方法需要蓝牙已经开启并有适当的权限。如果仍无效,可能是设备的固件版本或驱动问题。
上一篇:BluetoothAdapter.getDefaultAdapter()已过时,我现在应该使用什么?
下一篇:BluetoothAdapter.LeScanCallback无法找到BLE设备