Language

HidDevice.SendFeatureReport(Report, IExecutor, IOutcomeReceiver) Method

Definition

Send a feature report to the HID device.

[Android.Runtime.Register("sendFeatureReport", "(Landroid/hardware/hid/Report;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=37)]
[Android.Runtime.RequiresPermission("android.permission.ACCESS_HID")]
public void SendFeatureReport(Android.Hardware.Hid.Report report, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("sendFeatureReport", "(Landroid/hardware/hid/Report;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=37)>]
[<Android.Runtime.RequiresPermission("android.permission.ACCESS_HID")>]
member this.SendFeatureReport : Android.Hardware.Hid.Report * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

report
Report

the feature report to send. This value cannot be null.

executor
IExecutor

the executor on which the callback will be invoked. This value cannot be null. Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread.

callback
IOutcomeReceiver

the callback object to be used to notify of an error. This value cannot be null.

Attributes

Remarks

Send a feature report to the HID device.

The device must be opened first before calling this method.

On success, callback.onResult is called with null. On failure, callback.onError is called with one of the following: IOException: If the underlying hardware device could not be accessed or the system service returned a failure; SecurityException: If the caller lacks the required permission.. Requires Manifest.permission.ACCESS_HID

Android reference for android.hardware.hid.HidDevice.sendFeatureReport.

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.

Applies to