Condividi tramite


BluetoothGatt.SetCharacteristicNotification Metodo

Definizione

Abilitare o disabilitare notifiche/indicazioni per una determinata caratteristica.

[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

Parametri

characteristic
BluetoothGattCharacteristic

Caratteristica per cui abilitare le notifiche

enable
Boolean

Impostare su true per abilitare notifiche/indicazioni

Restituisce

true, se lo stato della notifica richiesto è stato impostato correttamente

Attributi

Commenti

Documentazione java per android.bluetooth.BluetoothGatt.setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic, boolean).

Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dal progetto Open Source Android e usato in base ai termini descritti nella licenza Creative Commons 2.5 Attribuzione.

Si applica a