BluetoothGattCharacteristic.SetValue 方法

定义

重载

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。

属性

注解

适用于 . 的 android.bluetooth.BluetoothGattCharacteristic.setValue(byte[])Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

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

此特征的新值

返回

如果已设置本地存储的值,则为 true

属性

注解

适用于 . 的 android.bluetooth.BluetoothGattCharacteristic.setValue(java.lang.String)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

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

应放置值的偏移量

返回

如果已设置本地存储的值,则为 true

属性

注解

适用于 . 的 android.bluetooth.BluetoothGattCharacteristic.setValue(int, int, int)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

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

此特征的 Mantissa

exponent
Int32

此特征的指数值

formatType
GattFormat

用于转换值参数的浮点格式类型

offset
Int32

应放置值的偏移量

返回

如果已设置本地存储的值,则为 true

属性

注解

适用于 . 的 android.bluetooth.BluetoothGattCharacteristic.setValue(int, int, int, int)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于