UsbManager.OpenDevice(UsbDevice) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Opens the device so it can be used to send and receive
data using android.hardware.usb.UsbRequest
.
[Android.Runtime.Register("openDevice", "(Landroid/hardware/usb/UsbDevice;)Landroid/hardware/usb/UsbDeviceConnection;", "GetOpenDevice_Landroid_hardware_usb_UsbDevice_Handler")]
public virtual Android.Hardware.Usb.UsbDeviceConnection? OpenDevice (Android.Hardware.Usb.UsbDevice? device);
[<Android.Runtime.Register("openDevice", "(Landroid/hardware/usb/UsbDevice;)Landroid/hardware/usb/UsbDeviceConnection;", "GetOpenDevice_Landroid_hardware_usb_UsbDevice_Handler")>]
abstract member OpenDevice : Android.Hardware.Usb.UsbDevice -> Android.Hardware.Usb.UsbDeviceConnection
override this.OpenDevice : Android.Hardware.Usb.UsbDevice -> Android.Hardware.Usb.UsbDeviceConnection
Parameters
- device
- UsbDevice
the device to open
Returns
a UsbDeviceConnection
, or null
if open failed
- Attributes
Remarks
Opens the device so it can be used to send and receive data using android.hardware.usb.UsbRequest
.
Java documentation for android.hardware.usb.UsbManager.openDevice(android.hardware.usb.UsbDevice)
.
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.