語言

BluetoothGattCharacteristic.SetValue 方法

定義

多載

名稱 Description
SetValue(Byte[])

更新此特性在本地儲存的值。

SetValue(String)

設定此特性在本地儲存的值。

SetValue(Int32, GattFormat, Int32)

設定此特性在本地儲存的值。

SetValue(Int32, Int32, GattFormat, Int32)

設定此特性在本地儲存的值。

SetValue(Byte[])

更新此特性在本地儲存的值。

[Android.Runtime.Register("setValue", "([B)Z", "GetSetValue_arrayBHandler")]
public virtual bool SetValue(byte[]? value);
[<Android.Runtime.Register("setValue", "([B)Z", "GetSetValue_arrayBHandler")>]
abstract member SetValue : byte[] -> bool
override this.SetValue : byte[] -> bool

參數

value
Byte[]

此特性的新值

傳回

若本地儲存的值已設定為 true;若無法在本地儲存,則為 false。

屬性

備註

更新此特性在本地儲存的值。

此函式會修改此特性在本地儲存的快取值。 要將值傳送到遠端裝置,請呼叫 BluetoothGatt#writeCharacteristic 將值傳送給遠端裝置。

此會員已被棄用。 直接將特徵值傳遞給 BluetoothGatt#writeCharacteristic(BluetoothGattCharacteristic, byte[], int)

Java 文件 android.bluetooth.BluetoothGattCharacteristic.setValue(.*byte[])。

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

適用於

SetValue(String)

設定此特性在本地儲存的值。

[Android.Runtime.Register("setValue", "(Ljava/lang/String;)Z", "GetSetValue_Ljava_lang_String_Handler")]
public virtual bool SetValue(string? value);
[<Android.Runtime.Register("setValue", "(Ljava/lang/String;)Z", "GetSetValue_Ljava_lang_String_Handler")>]
abstract member SetValue : string -> bool
override this.SetValue : string -> bool

參數

value
String

此特性的新值

傳回

若本地儲存值已設定為真

屬性

備註

設定此特性在本地儲存的值。

如需詳細資訊,請參閱 #setValue(byte[])。

此會員已被棄用。 直接將特徵值傳遞給 BluetoothGatt#writeCharacteristic(BluetoothGattCharacteristic, byte[], int)

Java 文件 android.bluetooth.BluetoothGattCharacteristic.setValue(java.lang.String)。

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

適用於

SetValue(Int32, GattFormat, Int32)

設定此特性在本地儲存的值。

[Android.Runtime.Register("setValue", "(III)Z", "GetSetValue_IIIHandler")]
public virtual bool SetValue(int value, Android.Bluetooth.GattFormat formatType, int offset);
[<Android.Runtime.Register("setValue", "(III)Z", "GetSetValue_IIIHandler")>]
abstract member SetValue : int * Android.Bluetooth.GattFormat * int -> bool
override this.SetValue : int * Android.Bluetooth.GattFormat * int -> bool

參數

value
Int32

此特性的新值

formatType
GattFormat

用於轉換值參數的整數格式類型

offset
Int32

值應置的偏移量

傳回

若本地儲存值已設定為真

屬性

備註

設定此特性在本地儲存的值。

如需詳細資訊,請參閱 #setValue(byte[])。

此會員已被棄用。 直接將特徵值傳遞給 BluetoothGatt#writeCharacteristic(BluetoothGattCharacteristic, byte[], int)

Java 文件 android.bluetooth.BluetoothGattCharacteristic.setValue(.*int, .*int, .*int)。

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

適用於

SetValue(Int32, Int32, GattFormat, Int32)

設定此特性在本地儲存的值。

[Android.Runtime.Register("setValue", "(IIII)Z", "GetSetValue_IIIIHandler")]
public virtual bool SetValue(int mantissa, int exponent, Android.Bluetooth.GattFormat formatType, int offset);
[<Android.Runtime.Register("setValue", "(IIII)Z", "GetSetValue_IIIIHandler")>]
abstract member SetValue : int * int * Android.Bluetooth.GattFormat * int -> bool
override this.SetValue : int * int * Android.Bluetooth.GattFormat * int -> bool

參數

mantissa
Int32

此特徵的尾數

exponent
Int32

此特徵的指數值

formatType
GattFormat

用於轉換值參數的浮點數格式類型

offset
Int32

值應置的偏移量

傳回

若本地儲存值已設定為真

屬性

備註

設定此特性在本地儲存的值。

如需詳細資訊,請參閱 #setValue(byte[])。

此會員已被棄用。 直接將特徵值傳遞給 BluetoothGatt#writeCharacteristic(BluetoothGattCharacteristic, byte[], int)

Java 文件 android.bluetooth.BluetoothGattCharacteristic.setValue(.*int, .*int, .*int, .*int)。

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

適用於