Поделиться через


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, если запрошенный статус уведомления был успешно задан

Атрибуты

Комментарии

Документация по Java для android.bluetooth.BluetoothGatt.setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic, boolean).

Части этой страницы — это изменения на основе работы, созданной и общей проектом с открытым исходным кодом Android и используемой в соответствии с условиями, описанными в лицензии Creative Commons 2.5 Attribution.

Применяется к