语言

BluetoothGatt.RequestConnectionPriority(GattConnectionPriority) 方法

定义

请求连接参数更新。

[Android.Runtime.Register("requestConnectionPriority", "(I)Z", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool RequestConnectionPriority(Android.Bluetooth.GattConnectionPriority connectionPriority);
[<Android.Runtime.Register("requestConnectionPriority", "(I)Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.RequestConnectionPriority : Android.Bluetooth.GattConnectionPriority -> bool

参数

connectionPriority
GattConnectionPriority

请求特定的连接优先级。 必须是其中BluetoothGatt#CONNECTION_PRIORITY_BALANCED之一或BluetoothGatt#CONNECTION_PRIORITY_HIGHBluetoothGatt#CONNECTION_PRIORITY_LOW_POWERBluetoothGatt#CONNECTION_PRIORITY_DCK。

返回

特性

例外

如果参数超出其指定范围。

注解

请求连接参数更新。

此函数将向远程设备发送连接参数更新请求。

Java文档android.bluetooth.BluetoothGatt.requestConnectionPriority(int)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于