BluetoothGatt.SetCharacteristicNotification Метод
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Включение или отключение уведомлений и указаний для заданной характеристики.
[Android.Runtime.Register("setCharacteristicNotification", "(Landroid/bluetooth/BluetoothGattCharacteristic;Z)Z", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool SetCharacteristicNotification (Android.Bluetooth.BluetoothGattCharacteristic? characteristic, bool enable);
[<Android.Runtime.Register("setCharacteristicNotification", "(Landroid/bluetooth/BluetoothGattCharacteristic;Z)Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.SetCharacteristicNotification : Android.Bluetooth.BluetoothGattCharacteristic * bool -> bool
Параметры
- characteristic
- BluetoothGattCharacteristic
Характеристика, для которой необходимо включить уведомления
- enable
- Boolean
Задайте значение true, чтобы включить уведомления и указания
Возвращаемое значение
Значение true, если запрошенный статус уведомления был успешно задан
- Атрибуты
Комментарии
Части этой страницы — это изменения на основе работы, созданной и общей проектом с открытым исходным кодом Android и используемой в соответствии с условиями, описанными в лицензии Creative Commons 2.5 Attribution.