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

属性

注釈

特定の特性に対する通知/表示を有効または無効にします。

特性に対して通知が有効になると、リモート デバイスが特定の特性が変更されたことを示す場合、 BluetoothGattCallback#onCharacteristicChanged(BluetoothGatt, BluetoothGattCharacteristic, byte[]) コールバックがトリガーされます。

Javaドキュメント。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象