Compartilhar via


BluetoothGatt.SetCharacteristicNotification Método

Definição

Habilitar ou desabilitar notificações/indicações para uma determinada característica.

[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

Parâmetros

characteristic
BluetoothGattCharacteristic

A característica para a qual habilitar notificações

enable
Boolean

Definir como true para habilitar notificações/indicações

Retornos

true, se o status de notificação solicitada foi definido com êxito

Atributos

Comentários

Documentação Java para android.bluetooth.BluetoothGatt.setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic, boolean).

Partes desta página são modificações baseadas no trabalho criado e compartilhado pelo Android Open Source Project e usado de acordo com os termos descritos na Creative Commons 2.5 Attribution License.

Aplica-se a