当前位置: 首页 > 工具软件 > USBManager > 使用案例 >

android.hardware.usb,UsbManager Class (Android.Hardware.Usb) | Microsoft Docs

白芷阳
2023-12-01

UsbManager Class

Definition

Assembly:Mono.Android.dll

This class allows you to access the state of USB and communicate with USB devices.

In this article

[Android.Runtime.Register("android/hardware/usb/UsbManager", ApiSince=12, DoNotGenerateAcw=true)]

public class UsbManager : Java.Lang.Object

type UsbManager = class

inherit Object

Inheritance

Remarks

Portions of this page are modifications based on work created and shared by the

Constructors

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

Fields

Broadcast Action: A broadcast for USB accessory attached event.

Broadcast Action: A broadcast for USB accessory detached event.

Broadcast Action: A broadcast for USB device attached event.

Broadcast Action: A broadcast for USB device detached event.

Name of extra for ActionUsbDeviceAttached and

ActionUsbDeviceDetached broadcasts

containing the UsbDevice object for the device.

Properties

Returns the unique instance of Class that represents this

object's class.

(Inherited from Object)

Returns a HashMap containing all USB devices currently attached.

The handle to the underlying Android instance.

(Inherited from Object)

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

Creates and returns a copy of this Object.

(Inherited from Object)

(Inherited from Object)

Compares this instance with the specified object and indicates if they

are equal.

(Inherited from Object)

Returns a list of currently attached USB accessories.

(in the current implementation there can be at most one)

Returns an integer hash code for this object.

(Inherited from Object)

Returns true if the caller has permission to access the accessory.

Returns true if the caller has permission to access the device.

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)

Causes a thread which is waiting on this object's monitor (by means of

calling one of the wait() methods) to be woken up.

(Inherited from Object)

Causes all threads which are waiting on this object's monitor (by means

of calling one of the wait() methods) to be woken up.

(Inherited from Object)

Opens a file descriptor for reading and writing data to the USB accessory.

Opens the device so it can be used to send and receive

data using UsbRequest.

Requests temporary permission for the given package to access the accessory.

Requests temporary permission for the given package to access the device.

Returns a string containing a concise, human-readable description of this

object.

(Inherited from Object)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the

specified timeout expires.

(Inherited from Object)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the

specified timeout expires.

(Inherited from Object)

Explicit Interface Implementations

Extension Methods

Applies to

 类似资料:

相关阅读

相关文章

相关问答