1
感谢您检查我的问题。Android蓝牙Ble防止Pair请求
我使用的代码在Android开发者,使BLE连接:
BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address);
if (device == null) {
Log.w(TAG, "Device not found. Unable to connect.");
return false;
}
// We want to directly connect to the device, so we are setting the autoConnect
// parameter to false.
if (mBluetoothGatt != null) {
mBluetoothGatt.close();
mBluetoothGatt = null;
}
mBluetoothGatt = device.connectGatt(this, false, mGattCallback);
但代码的工作之后,对对话框会显示出来,而我实际上并不需要对工作,我只需要连接客户端,然后发送数据(我需要连接的远程设备已被设置为“不需要配对”),有什么方法可以避免配对呼叫?
谢谢!
嗯,但我真的取消远程设备的安全要求,导致ios方现在不启动对对话框。 – Sunderr