BluetoothGattConnectionSettings.Builder.SetOpportunisticEnabled 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置此 GATT 客户端是否具有机会性。
[Android.Runtime.Register("setOpportunisticEnabled", "(Z)Landroid/bluetooth/BluetoothGattConnectionSettings$Builder;", "", ApiSince=37)]
public Android.Bluetooth.BluetoothGattConnectionSettings.Builder SetOpportunisticEnabled(bool opportunisticEnabled);
[<Android.Runtime.Register("setOpportunisticEnabled", "(Z)Landroid/bluetooth/BluetoothGattConnectionSettings$Builder;", "", ApiSince=37)>]
member this.SetOpportunisticEnabled : bool -> Android.Bluetooth.BluetoothGattConnectionSettings.Builder
参数
- opportunisticEnabled
- Boolean
如果此连接是机会性的,则为 true,否则为 false。
返回
此生成器。 此值不能为 null。
- 特性
注解
设置此 GATT 客户端是否具有机会性。 机会 GATT 客户端不保留 GATT 连接。 当远程设备没有其他 GATT 连接处于活动状态时,它会自动断开连接
Android 参考。android.bluetooth.BluetoothGattConnectionSettings.Builder.setOpportunisticEnabled
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。