Partager via


UsbRequest.Initialize(UsbDeviceConnection, UsbEndpoint) Method

Definition

Initializes the request so it can read or write data on the given endpoint.

[Android.Runtime.Register("initialize", "(Landroid/hardware/usb/UsbDeviceConnection;Landroid/hardware/usb/UsbEndpoint;)Z", "GetInitialize_Landroid_hardware_usb_UsbDeviceConnection_Landroid_hardware_usb_UsbEndpoint_Handler")]
public virtual bool Initialize (Android.Hardware.Usb.UsbDeviceConnection? connection, Android.Hardware.Usb.UsbEndpoint? endpoint);
[<Android.Runtime.Register("initialize", "(Landroid/hardware/usb/UsbDeviceConnection;Landroid/hardware/usb/UsbEndpoint;)Z", "GetInitialize_Landroid_hardware_usb_UsbDeviceConnection_Landroid_hardware_usb_UsbEndpoint_Handler")>]
abstract member Initialize : Android.Hardware.Usb.UsbDeviceConnection * Android.Hardware.Usb.UsbEndpoint -> bool
override this.Initialize : Android.Hardware.Usb.UsbDeviceConnection * Android.Hardware.Usb.UsbEndpoint -> bool

Parameters

connection
UsbDeviceConnection
endpoint
UsbEndpoint

the endpoint to be used for this request.

Returns

true if the request was successfully opened.

Attributes

Remarks

Initializes the request so it can read or write data on the given endpoint. Whether the request allows reading or writing depends on the direction of the endpoint.

Java documentation for android.hardware.usb.UsbRequest.initialize(android.hardware.usb.UsbDeviceConnection, android.hardware.usb.UsbEndpoint).

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