BluetoothGattServer.NotifyCharacteristicChanged Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
NotifyCharacteristicChanged(BluetoothDevice, BluetoothGattCharacteristic, Boolean) |
Send a notification or indication that a local characteristic has been updated. |
NotifyCharacteristicChanged(BluetoothDevice, BluetoothGattCharacteristic, Boolean, Byte[]) |
Send a notification or indication that a local characteristic has been updated. |
NotifyCharacteristicChanged(BluetoothDevice, BluetoothGattCharacteristic, Boolean)
Send a notification or indication that a local characteristic has been updated.
[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
Parameters
- device
- BluetoothDevice
The remote device to receive the notification/indication
- characteristic
- BluetoothGattCharacteristic
The local characteristic that has been updated
- confirm
- Boolean
true to request confirmation from the client (indication), false to send a notification
Returns
true, if the notification has been triggered successfully
- Attributes
Exceptions
Remarks
Send a notification or indication that a local characteristic has been updated.
A notification or indication is sent to the remote device to signal that the characteristic has been updated. This function should be invoked for every client that requests notifications/indications by writing to the "Client Configuration" descriptor for the given characteristic.
This member is deprecated. Use BluetoothGattServer#notifyCharacteristicChanged(BluetoothDevice, BluetoothGattCharacteristic, boolean, byte[])
as this is not memory safe.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
NotifyCharacteristicChanged(BluetoothDevice, BluetoothGattCharacteristic, Boolean, Byte[])
Send a notification or indication that a local characteristic has been updated.
[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
Parameters
- device
- BluetoothDevice
the remote device to receive the notification/indication
- characteristic
- BluetoothGattCharacteristic
the local characteristic that has been updated
- confirm
- Boolean
true
to request confirmation from the client (indication) or false
to send a notification
- value
- Byte[]
the characteristic value
Returns
whether the notification has been triggered successfully
- Attributes
Remarks
Send a notification or indication that a local characteristic has been updated.
A notification or indication is sent to the remote device to signal that the characteristic has been updated. This function should be invoked for every client that requests notifications/indications by writing to the "Client Configuration" descriptor for the given characteristic.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.