BluetoothGatt.SetCharacteristicNotification メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
特定の特性に対する通知/表示を有効または無効にします。
[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[]) コールバックがトリガーされます。
このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。