语言

BluetoothHeadset.SendVendorSpecificResultCode 方法

定义

将特定于供应商的未经请求的结果代码发送到头戴显示设备。

[Android.Runtime.Register("sendVendorSpecificResultCode", "(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;Ljava/lang/String;)Z", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool SendVendorSpecificResultCode(Android.Bluetooth.BluetoothDevice? device, string? command, string? arg);
[<Android.Runtime.Register("sendVendorSpecificResultCode", "(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;Ljava/lang/String;)Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.SendVendorSpecificResultCode : Android.Bluetooth.BluetoothDevice * string * string -> bool

参数

device
BluetoothDevice

蓝牙耳机。

command
String

特定于供应商的命令。

arg
String

将附加到命令的参数。

返回

false 如果没有连接头戴显示设备,或者命令不是允许的供应商特定的未经请求的结果代码,或出错。 否则为 true。

特性

例外

如果为 .,则为commandnull

注解

将特定于供应商的未经请求的结果代码发送到头戴显示设备。

要发送的实际字符串为 command + ": " + arg。 例如,如果是command#VENDOR_RESULT_CODE_COMMAND_ANDROID且arg是"0",则会发送字符串"+ANDROID: 0"。

目前仅 #VENDOR_RESULT_CODE_COMMAND_ANDROID 允许为 command.

Java文档android.bluetooth.BluetoothHeadset.sendVendorSpecificResultCode(android.bluetooth.BluetoothDevice, java.lang.String, java.lang.String)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于