# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Ctors | Inherited Methods

# UsbConstants

`public final class UsbConstants`
`extends Object` ``

java.lang.Object
↳ | android.hardware.usb.UsbConstants

Contains constants for the USB protocol. These constants correspond to definitions in linux/usb/ch9.h in the linux kernel.

## Summary

### Constants
`int` | `USB_CLASS_APP_SPEC` Application specific USB class.
`int` | `USB_CLASS_AUDIO` USB class for audio devices.
`int` | `USB_CLASS_CDC_DATA` USB class for CDC devices (communications device class).
`int` | `USB_CLASS_COMM` USB class for communication devices.
`int` | `USB_CLASS_CONTENT_SEC` USB class for content security devices.
`int` | `USB_CLASS_CSCID` USB class for content smart card devices.
`int` | `USB_CLASS_HID` USB class for human interface devices (for example, mice and keyboards).
`int` | `USB_CLASS_HUB` USB class for USB hubs.
`int` | `USB_CLASS_MASS_STORAGE` USB class for mass storage devices.
`int` | `USB_CLASS_MISC` USB class for wireless miscellaneous devices.
`int` | `USB_CLASS_PER_INTERFACE` USB class indicating that the class is determined on a per-interface basis.
`int` | `USB_CLASS_PHYSICA` USB class for physical devices.
`int` | `USB_CLASS_PRINTER` USB class for printers.
`int` | `USB_CLASS_STILL_IMAGE` USB class for still image devices (digital cameras).
`int` | `USB_CLASS_VENDOR_SPEC` Vendor specific USB class.
`int` | `USB_CLASS_VIDEO` USB class for video devices.
`int` | `USB_CLASS_WIRELESS_CONTROLLER` USB class for wireless controller devices.
`int` | `USB_DIR_IN` Used to signify direction of data for a `UsbEndpoint` is IN (device to host)
`int` | `USB_DIR_OUT` Used to signify direction of data for a `UsbEndpoint` is OUT (host to device)
`int` | `USB_ENDPOINT_DIR_MASK` Bitmask used for extracting the `UsbEndpoint` direction from its address field.
`int` | `USB_ENDPOINT_NUMBER_MASK` Bitmask used for extracting the `UsbEndpoint` number its address field.
`int` | `USB_ENDPOINT_XFERTYPE_MASK` Bitmask used for extracting the `UsbEndpoint` type from its address field.
`int` | `USB_ENDPOINT_XFER_BULK` Bulk endpoint type
`int` | `USB_ENDPOINT_XFER_CONTROL` Control endpoint type (endpoint zero)
`int` | `USB_ENDPOINT_XFER_INT` Interrupt endpoint type
`int` | `USB_ENDPOINT_XFER_ISOC` Isochronous endpoint type (currently not supported)
`int` | `USB_INTERFACE_SUBCLASS_BOOT` Boot subclass for HID devices.
`int` | `USB_SUBCLASS_VENDOR_SPEC` Vendor specific USB subclass.
`int` | `USB_TYPE_CLASS` Used to specify that an endpoint zero control request is a class specific request.
`int` | `USB_TYPE_MASK` Bitmask used for encoding the request type for a control request on endpoint zero.
`int` | `USB_TYPE_RESERVED` Reserved endpoint zero control request type (currently unused).
`int` | `USB_TYPE_STANDARD` Used to specify that an endpoint zero control request is a standard request.
`int` | `USB_TYPE_VENDOR` Used to specify that an endpoint zero control request is a vendor specific request.

### Public constructors
`UsbConstants()`

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### USB_CLASS_APP_SPEC

    public static final int USB_CLASS_APP_SPEC

Application specific USB class.

Constant Value: 254 (0x000000fe)

### USB_CLASS_AUDIO

    public static final int USB_CLASS_AUDIO

USB class for audio devices.

Constant Value: 1 (0x00000001)

### USB_CLASS_CDC_DATA

    public static final int USB_CLASS_CDC_DATA

USB class for CDC devices (communications device class).

Constant Value: 10 (0x0000000a)

### USB_CLASS_COMM

    public static final int USB_CLASS_COMM

USB class for communication devices.

Constant Value: 2 (0x00000002)

### USB_CLASS_CONTENT_SEC

    public static final int USB_CLASS_CONTENT_SEC

USB class for content security devices.

Constant Value: 13 (0x0000000d)

### USB_CLASS_CSCID

    public static final int USB_CLASS_CSCID

USB class for content smart card devices.

Constant Value: 11 (0x0000000b)

### USB_CLASS_HID

    public static final int USB_CLASS_HID

USB class for human interface devices (for example, mice and keyboards).

Constant Value: 3 (0x00000003)

### USB_CLASS_HUB

    public static final int USB_CLASS_HUB

USB class for USB hubs.

Constant Value: 9 (0x00000009)

### USB_CLASS_MASS_STORAGE

    public static final int USB_CLASS_MASS_STORAGE

USB class for mass storage devices.

Constant Value: 8 (0x00000008)

### USB_CLASS_MISC

    public static final int USB_CLASS_MISC

USB class for wireless miscellaneous devices.

Constant Value: 239 (0x000000ef)

### USB_CLASS_PER_INTERFACE

    public static final int USB_CLASS_PER_INTERFACE

USB class indicating that the class is determined on a per-interface basis.

Constant Value: 0 (0x00000000)

### USB_CLASS_PHYSICA

    public static final int USB_CLASS_PHYSICA

USB class for physical devices.

Constant Value: 5 (0x00000005)

### USB_CLASS_PRINTER

    public static final int USB_CLASS_PRINTER

USB class for printers.

Constant Value: 7 (0x00000007)

### USB_CLASS_STILL_IMAGE

    public static final int USB_CLASS_STILL_IMAGE

USB class for still image devices (digital cameras).

Constant Value: 6 (0x00000006)

### USB_CLASS_VENDOR_SPEC

    public static final int USB_CLASS_VENDOR_SPEC

Vendor specific USB class.

Constant Value: 255 (0x000000ff)

### USB_CLASS_VIDEO

    public static final int USB_CLASS_VIDEO

USB class for video devices.

Constant Value: 14 (0x0000000e)

### USB_CLASS_WIRELESS_CONTROLLER

    public static final int USB_CLASS_WIRELESS_CONTROLLER

USB class for wireless controller devices.

Constant Value: 224 (0x000000e0)

### USB_DIR_IN

    public static final int USB_DIR_IN

Used to signify direction of data for a `UsbEndpoint` is IN (device to host)

See also:

- `UsbEndpoint.getDirection()`

Constant Value: 128 (0x00000080)

### USB_DIR_OUT

    public static final int USB_DIR_OUT

Used to signify direction of data for a `UsbEndpoint` is OUT (host to device)

See also:

- `UsbEndpoint.getDirection()`

Constant Value: 0 (0x00000000)

### USB_ENDPOINT_DIR_MASK

    public static final int USB_ENDPOINT_DIR_MASK

Bitmask used for extracting the `UsbEndpoint` direction from its address field.

See also:

- `UsbEndpoint.getAddress()`
- `UsbEndpoint.getDirection()`
- `USB_DIR_OUT`
- `USB_DIR_IN`

Constant Value: 128 (0x00000080)

### USB_ENDPOINT_NUMBER_MASK

    public static final int USB_ENDPOINT_NUMBER_MASK

Bitmask used for extracting the `UsbEndpoint` number its address field.

See also:

- `UsbEndpoint.getAddress()`
- `UsbEndpoint.getEndpointNumber()`

Constant Value: 15 (0x0000000f)

### USB_ENDPOINT_XFERTYPE_MASK

    public static final int USB_ENDPOINT_XFERTYPE_MASK

Bitmask used for extracting the `UsbEndpoint` type from its address field.

See also:

- `UsbEndpoint.getAddress()`
- `UsbEndpoint.getType()`
- `USB_ENDPOINT_XFER_CONTROL`
- `USB_ENDPOINT_XFER_ISOC`
- `USB_ENDPOINT_XFER_BULK`
- `USB_ENDPOINT_XFER_INT`

Constant Value: 3 (0x00000003)

### USB_ENDPOINT_XFER_BULK

    public static final int USB_ENDPOINT_XFER_BULK

Bulk endpoint type

See also:

- `UsbEndpoint.getType()`

Constant Value: 2 (0x00000002)

### USB_ENDPOINT_XFER_CONTROL

    public static final int USB_ENDPOINT_XFER_CONTROL

Control endpoint type (endpoint zero)

See also:

- `UsbEndpoint.getType()`

Constant Value: 0 (0x00000000)

### USB_ENDPOINT_XFER_INT

    public static final int USB_ENDPOINT_XFER_INT

Interrupt endpoint type

See also:

- `UsbEndpoint.getType()`

Constant Value: 3 (0x00000003)

### USB_ENDPOINT_XFER_ISOC

    public static final int USB_ENDPOINT_XFER_ISOC

Isochronous endpoint type (currently not supported)

See also:

- `UsbEndpoint.getType()`

Constant Value: 1 (0x00000001)

### USB_INTERFACE_SUBCLASS_BOOT

    public static final int USB_INTERFACE_SUBCLASS_BOOT

Boot subclass for HID devices.

Constant Value: 1 (0x00000001)

### USB_SUBCLASS_VENDOR_SPEC

    public static final int USB_SUBCLASS_VENDOR_SPEC

Vendor specific USB subclass.

Constant Value: 255 (0x000000ff)

### USB_TYPE_CLASS

    public static final int USB_TYPE_CLASS

Used to specify that an endpoint zero control request is a class specific request.

Constant Value: 32 (0x00000020)

### USB_TYPE_MASK

    public static final int USB_TYPE_MASK

Bitmask used for encoding the request type for a control request on endpoint zero.

Constant Value: 96 (0x00000060)

### USB_TYPE_RESERVED

    public static final int USB_TYPE_RESERVED

Reserved endpoint zero control request type (currently unused).

Constant Value: 96 (0x00000060)

### USB_TYPE_STANDARD

    public static final int USB_TYPE_STANDARD

Used to specify that an endpoint zero control request is a standard request.

Constant Value: 0 (0x00000000)

### USB_TYPE_VENDOR

    public static final int USB_TYPE_VENDOR

Used to specify that an endpoint zero control request is a vendor specific request.

Constant Value: 64 (0x00000040)

## Public constructors

### UsbConstants

    public UsbConstants ()

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*