UsbDeviceConnection.RequestWait Method

Definition

Overloads

RequestWait()

Waits for the result of a android.hardware.usb.UsbRequest#queue operation

RequestWait(Int64)

Waits for the result of a android.hardware.usb.UsbRequest#queue operation

RequestWait()

Waits for the result of a android.hardware.usb.UsbRequest#queue operation

[Android.Runtime.Register("requestWait", "()Landroid/hardware/usb/UsbRequest;", "GetRequestWaitHandler")]
public virtual Android.Hardware.Usb.UsbRequest? RequestWait ();
[<Android.Runtime.Register("requestWait", "()Landroid/hardware/usb/UsbRequest;", "GetRequestWaitHandler")>]
abstract member RequestWait : unit -> Android.Hardware.Usb.UsbRequest
override this.RequestWait : unit -> Android.Hardware.Usb.UsbRequest

Returns

a completed USB request, or null if an error occurred

Attributes

Remarks

Waits for the result of a android.hardware.usb.UsbRequest#queue operation

Note that this may return requests queued on multiple android.hardware.usb.UsbEndpoints. When multiple endpoints are in use, android.hardware.usb.UsbRequest#getEndpoint and android.hardware.usb.UsbRequest#getClientData can be useful in determining how to process the result of this function.

Java documentation for android.hardware.usb.UsbDeviceConnection.requestWait().

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

RequestWait(Int64)

Waits for the result of a android.hardware.usb.UsbRequest#queue operation

[Android.Runtime.Register("requestWait", "(J)Landroid/hardware/usb/UsbRequest;", "GetRequestWait_JHandler", ApiSince=26)]
public virtual Android.Hardware.Usb.UsbRequest? RequestWait (long timeout);
[<Android.Runtime.Register("requestWait", "(J)Landroid/hardware/usb/UsbRequest;", "GetRequestWait_JHandler", ApiSince=26)>]
abstract member RequestWait : int64 -> Android.Hardware.Usb.UsbRequest
override this.RequestWait : int64 -> Android.Hardware.Usb.UsbRequest

Parameters

timeout
Int64

timeout in milliseconds. If 0 this method does not wait.

Returns

a completed USB request, or null if an error occurred

Attributes

Remarks

Waits for the result of a android.hardware.usb.UsbRequest#queue operation

Note that this may return requests queued on multiple android.hardware.usb.UsbEndpoints. When multiple endpoints are in use, android.hardware.usb.UsbRequest#getEndpoint and android.hardware.usb.UsbRequest#getClientData can be useful in determining how to process the result of this function.

Android processes UsbRequest UsbRequests asynchronously. Hence it is not guaranteed that #requestWait(long) requestWait(0) returns a request that has been queued right before even if the request could have been processed immediately.

Java documentation for android.hardware.usb.UsbDeviceConnection.requestWait(long).

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