在Xamarin.Android中找不到PairingParams.PAIRING_VARIANT_许可

在Xamarin.Android中找不到PairingParams.PAIRING_VARIANT_许可,xamarin.android,android-bluetooth,Xamarin.android,Android Bluetooth,我遇到了一个问题,当配对请求发生时,我得到了以下配对参数。配对变量\u同意(=3)配对变量,但在 objectobj=intent.GetParcelableExtra(BluetoothDevice.ExtraDevice); 蓝牙设备=(obj作为蓝牙设备)!; var extraPairingVariant=intent.GetIntExtra(BluetoothDevice.extraPairingVariant,0); 开关(外部配对变型) { 案例BluetoothDevice.Pa

我遇到了一个问题,当配对请求发生时,我得到了以下
配对参数。配对变量\u同意
(=3)配对变量,但在

objectobj=intent.GetParcelableExtra(BluetoothDevice.ExtraDevice);
蓝牙设备=(obj作为蓝牙设备)!;
var extraPairingVariant=intent.GetIntExtra(BluetoothDevice.extraPairingVariant,0);
开关(外部配对变型)
{
案例BluetoothDevice.PairingVariantPin:
{
...
}
打破
案例BluetoothDevice.PairingVariantPasskey确认:
{
...
}
打破
案例\*3,这里应该是什么常数*\
{
...
}
打破
}
<代码>蓝牙设备不包含类似于
配对\u变体\u同意的内容


是否有人遇到了相同的问题?

在我的情况下,我调用
abortBroadcast()
不显示pin对话框,但前提是
BluetoothDevice.ExtraPairingVariant
不是
3
。否则,必须显示一个对话框,用户才能接受配对。移除已配对的设备并要求再次配对时,会出现此状态。()


在我的例子中,我调用
abortBroadcast()
不显示pin对话框,但仅当
BluetoothDevice.ExtraPairingVariant
不是
3
时才显示。否则,必须显示一个对话框,用户才能接受配对。移除已配对的设备并要求再次配对时,会出现此状态。()

BluetoothDevice device = (BluetoothDevice)intent.GetParcelableExtra(BluetoothDevice.ExtraDevice);
if (action == BluetoothDevice.ActionPairingRequest)
        {
            device.SetPin(System.Text.Encoding.UTF8.GetBytes("####"));
            int exraPairingVariant = intent.GetIntExtra(BluetoothDevice.ExtraPairingVariant, 0);
            if (exraPairingVariant == BluetoothDevice.PairingVariantPasskeyConfirmation || exraPairingVariant == BluetoothDevice.PairingVariantPin)
            {
                InvokeAbortBroadcast();
            }
        }