语言

BluetoothHidDevice.RegisterApp 方法

定义

注册要用于 HID 设备的应用程序。

[Android.Runtime.Register("registerApp", "(Landroid/bluetooth/BluetoothHidDeviceAppSdpSettings;Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;Ljava/util/concurrent/Executor;Landroid/bluetooth/BluetoothHidDevice$Callback;)Z", "", ApiSince=28)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool RegisterApp(Android.Bluetooth.BluetoothHidDeviceAppSdpSettings? sdp, Android.Bluetooth.BluetoothHidDeviceAppQosSettings? inQos, Android.Bluetooth.BluetoothHidDeviceAppQosSettings? outQos, Java.Util.Concurrent.IExecutor? executor, Android.Bluetooth.BluetoothHidDevice.Callback? callback);
[<Android.Runtime.Register("registerApp", "(Landroid/bluetooth/BluetoothHidDeviceAppSdpSettings;Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;Ljava/util/concurrent/Executor;Landroid/bluetooth/BluetoothHidDevice$Callback;)Z", "", ApiSince=28)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.RegisterApp : Android.Bluetooth.BluetoothHidDeviceAppSdpSettings * Android.Bluetooth.BluetoothHidDeviceAppQosSettings * Android.Bluetooth.BluetoothHidDeviceAppQosSettings * Java.Util.Concurrent.IExecutor * Android.Bluetooth.BluetoothHidDevice.Callback -> bool

参数

sdp
BluetoothHidDeviceAppSdpSettings

BluetoothHidDeviceAppSdpSettings HID 设备 SDP 记录的对象。 需要 HID 设备 SDP 记录。

inQos
BluetoothHidDeviceAppQosSettings

BluetoothHidDeviceAppQosSettings 传入 QoS 设置的对象。 不需要传入 QoS 设置。 将 null 或默认 BluetoothHidDeviceAppQosSettings.Builder 用于默认值。

outQos
BluetoothHidDeviceAppQosSettings

BluetoothHidDeviceAppQosSettings 传出 QoS 设置的对象。 不需要传出 QoS 设置。 将 null 或默认 BluetoothHidDeviceAppQosSettings.Builder 用于默认值。

executor
IExecutor

Executor 将对其执行回调的对象。 需要执行程序对象。

callback
BluetoothHidDevice.Callback

Callback 将向其发送回调消息的对象。 需要 Callback 对象。

返回

如果成功发送命令,则为 true;否则为 false。

特性

注解

Java文档android.bluetooth.BluetoothHidDevice.registerApp(android.bluetooth.BluetoothHidDeviceAppSdpSettings, android.bluetooth.BluetoothHidDeviceAppQosSettings, android.bluetooth.BluetoothHidDeviceAppQosSettings, java.util.concurrent.Executor, android.bluetooth.Callback)。

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

适用于