Android.Hardware.Usb.UsbManager Members

The members of Android.Hardware.Usb.UsbManager are listed below.

See Also: Inherited members from Java.Lang.Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

const
ActionUsbAccessoryAttachedstring. Broadcast Action: A broadcast for USB accessory attached event.
const
ActionUsbAccessoryDetachedstring. Broadcast Action: A broadcast for USB accessory detached event.
const
ActionUsbDeviceAttachedstring. Broadcast Action: A broadcast for USB device attached event.
const
ActionUsbDeviceDetachedstring. Broadcast Action: A broadcast for USB device detached event.
const
ExtraAccessorystring. Name of extra for UsbManager.ActionUsbAccessoryAttached and UsbManager.ActionUsbAccessoryDetached broadcasts containing the UsbAccessory object for the accessory.
const
ExtraDevicestring. Name of extra for UsbManager.ActionUsbDeviceAttached and UsbManager.ActionUsbDeviceDetached broadcasts containing the UsbDevice object for the device.
const
ExtraPermissionGrantedstring. Name of extra added to the Android.App.PendingIntent passed into UsbManager.RequestPermission(UsbDevice, Android.App.PendingIntent) or UsbManager.RequestPermission(UsbAccessory, Android.App.PendingIntent) containing a boolean value indicating whether the user granted permission or not.

Public Properties

[read-only]
DeviceListIDictionary<string, UsbDevice>. Returns a HashMap containing all USB devices currently attached.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

GetAccessoryList() : UsbAccessory[]
Returns a list of currently attached USB accessories. (in the current implementation there can be at most one)
HasPermission(UsbAccessory) : bool
Returns true if the caller has permission to access the accessory.
HasPermission(UsbDevice) : bool
Returns true if the caller has permission to access the device.
OpenAccessory(UsbAccessory) : Android.OS.ParcelFileDescriptor
Opens a file descriptor for reading and writing data to the USB accessory.
OpenDevice(UsbDevice) : UsbDeviceConnection
Opens the device so it can be used to send and receive data using Android.Hardware.Usb.UsbRequest.
RequestPermission(UsbAccessory, Android.App.PendingIntent)
Requests temporary permission for the given package to access the accessory.
RequestPermission(UsbDevice, Android.App.PendingIntent)
Requests temporary permission for the given package to access the device.