Taal

HidDevice.GetFeatureReport(Int32, IExecutor, IOutcomeReceiver) Method

Definition

Get a feature report from the HID device.

[Android.Runtime.Register("getFeatureReport", "(ILjava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=37)]
[Android.Runtime.RequiresPermission("android.permission.ACCESS_HID")]
public void GetFeatureReport(int reportId, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("getFeatureReport", "(ILjava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=37)>]
[<Android.Runtime.RequiresPermission("android.permission.ACCESS_HID")>]
member this.GetFeatureReport : int * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

reportId
Int32

the feature report to get.

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 the report or an error. This value cannot be null.

Attributes

Remarks

Get a feature report from the HID device.

The device must be opened first before calling this method.

On success, callback.onResult is called with the retrieved Report. 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.getFeatureReport.

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