語言

BluetoothGatt.ReadCharacteristic(BluetoothGattCharacteristic) 方法

定義

從相關的遠端裝置讀取所請求的特性。

[Android.Runtime.Register("readCharacteristic", "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool ReadCharacteristic(Android.Bluetooth.BluetoothGattCharacteristic? characteristic);
[<Android.Runtime.Register("readCharacteristic", "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.ReadCharacteristic : Android.Bluetooth.BluetoothGattCharacteristic -> bool

參數

characteristic
BluetoothGattCharacteristic

從遠端裝置讀取的特性

傳回

如果讀取操作成功啟動,則為真

屬性

備註

從相關的遠端裝置讀取所請求的特性。

這是異步操作。 讀取操作的結果會由 BluetoothGattCallback#onCharacteristicRead(BluetoothGatt, BluetoothGattCharacteristic, byte[], int) 回調報告。

Java 文件 android.bluetooth.BluetoothGatt.readCharacteristic(android.bluetooth.BluetoothGattCharacteristic)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於