BluetoothHeadset.SendVendorSpecificResultCode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sends a vendor-specific unsolicited result code to the headset.
[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
Parameters
- device
- BluetoothDevice
Bluetooth headset.
- command
- String
A vendor-specific command.
- arg
- String
The argument that will be attached to the command.
Returns
false
if there is no headset connected, or if the command is not an allowed
vendor-specific unsolicited result code, or on error. true
otherwise.
- Attributes
Exceptions
if command
is null
.
Remarks
Sends a vendor-specific unsolicited result code to the headset.
The actual string to be sent is command + ": " + arg
. For example, if command
is #VENDOR_RESULT_CODE_COMMAND_ANDROID
and arg
is "0"
, the string "+ANDROID: 0"
will be sent.
Currently only #VENDOR_RESULT_CODE_COMMAND_ANDROID
is allowed as command
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.