Langue

BluetoothGattServer.NotifyCharacteristicChanged Méthode

Définition

Surcharges

Nom Description
NotifyCharacteristicChanged(BluetoothDevice, BluetoothGattCharacteristic, Boolean)

Envoyez une notification ou indiquez qu’une caractéristique locale a été mise à jour.

NotifyCharacteristicChanged(BluetoothDevice, BluetoothGattCharacteristic, Boolean, Byte[])

Envoyez une notification ou indiquez qu’une caractéristique locale a été mise à jour.

NotifyCharacteristicChanged(BluetoothDevice, BluetoothGattCharacteristic, Boolean)

Envoyez une notification ou indiquez qu’une caractéristique locale a été mise à jour.

[Android.Runtime.Register("notifyCharacteristicChanged", "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothGattCharacteristic;Z)Z", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool NotifyCharacteristicChanged(Android.Bluetooth.BluetoothDevice? device, Android.Bluetooth.BluetoothGattCharacteristic? characteristic, bool confirm);
[<Android.Runtime.Register("notifyCharacteristicChanged", "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothGattCharacteristic;Z)Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.NotifyCharacteristicChanged : Android.Bluetooth.BluetoothDevice * Android.Bluetooth.BluetoothGattCharacteristic * bool -> bool

Paramètres

device
BluetoothDevice

Appareil distant à recevoir la notification/indication

characteristic
BluetoothGattCharacteristic

Caractéristique locale mise à jour

confirm
Boolean

true pour demander la confirmation du client (indication), false pour envoyer une notification

Retours

true, si la notification a été déclenchée avec succès

Attributs

Exceptions

Remarques

Envoyez une notification ou indiquez qu’une caractéristique locale a été mise à jour.

Une notification ou une indication est envoyée à l’appareil distant pour signaler que la caractéristique a été mise à jour. Cette fonction doit être appelée pour chaque client qui demande des notifications/indications en écrivant dans le descripteur « Configuration du client » pour la caractéristique donnée.

Ce membre est déconseillé. Utilisez BluetoothGattServer#notifyCharacteristicChanged(BluetoothDevice, BluetoothGattCharacteristic, boolean, byte[]) ce qui n’est pas sécurisé en mémoire.

Java documentation pour android.bluetooth.BluetoothGattServer.notifyCharacteristicChanged(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothGattCharacteristic, boolean).

Les parties de cette page sont des modifications basées sur le travail créé et partagé par Android Open Source et utilisées en fonction des termes décrits dans la Creative Commons 2.5 Attribution License.

S’applique à

NotifyCharacteristicChanged(BluetoothDevice, BluetoothGattCharacteristic, Boolean, Byte[])

Envoyez une notification ou indiquez qu’une caractéristique locale a été mise à jour.

[Android.Runtime.Register("notifyCharacteristicChanged", "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothGattCharacteristic;Z[B)I", "", ApiSince=33)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public int NotifyCharacteristicChanged(Android.Bluetooth.BluetoothDevice device, Android.Bluetooth.BluetoothGattCharacteristic characteristic, bool confirm, byte[] value);
[<Android.Runtime.Register("notifyCharacteristicChanged", "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothGattCharacteristic;Z[B)I", "", ApiSince=33)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.NotifyCharacteristicChanged : Android.Bluetooth.BluetoothDevice * Android.Bluetooth.BluetoothGattCharacteristic * bool * byte[] -> int

Paramètres

device
BluetoothDevice

l’appareil distant à recevoir la notification/indication

characteristic
BluetoothGattCharacteristic

caractéristique locale qui a été mise à jour

confirm
Boolean

true demander la confirmation du client (indication) ou false envoyer une notification

value
Byte[]

valeur caractéristique

Retours

si la notification a été déclenchée avec succès

Attributs

Remarques

Envoyez une notification ou indiquez qu’une caractéristique locale a été mise à jour.

Une notification ou une indication est envoyée à l’appareil distant pour signaler que la caractéristique a été mise à jour. Cette fonction doit être appelée pour chaque client qui demande des notifications/indications en écrivant dans le descripteur « Configuration du client » pour la caractéristique donnée.

Java documentation pour android.bluetooth.BluetoothGattServer.notifyCharacteristicChanged(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothGattCharacteristic, boolean, byte[]).

Les parties de cette page sont des modifications basées sur le travail créé et partagé par Android Open Source et utilisées en fonction des termes décrits dans la Creative Commons 2.5 Attribution License.

S’applique à