Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions) Summary: [Constants](https://developer.android.com/reference/android/hardware/hid/HidDevice#constants) \| [Methods](https://developer.android.com/reference/android/hardware/hid/HidDevice#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/hardware/hid/HidDevice#inhmethods)

# HidDevice

*** ** * ** ***


`
public

final

class
HidDevice
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/java/lang/AutoCloseable


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.hardware.hid.HidDevice |

<br />

*** ** * ** ***

Represents a Human Interface Device (HID) connected to the system.

HIDs are devices like keyboards, mice, game controllers, and other peripherals that follow
the HID specification for communication over various transports (USB, Bluetooth, etc.).

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/hardware/hid/HidDevice#TRANSPORT_BLUETOOTH` Transport type is Bluetooth. |
| `int` | `https://developer.android.com/reference/android/hardware/hid/HidDevice#TRANSPORT_I2C` Transport type is I2C. |
| `int` | `https://developer.android.com/reference/android/hardware/hid/HidDevice#TRANSPORT_SPI` Transport type is SPI. |
| `int` | `https://developer.android.com/reference/android/hardware/hid/HidDevice#TRANSPORT_UNKNOWN` Transport type is unknown. |
| `int` | `https://developer.android.com/reference/android/hardware/hid/HidDevice#TRANSPORT_USB` Transport type is USB. |
| `int` | `https://developer.android.com/reference/android/hardware/hid/HidDevice#TRANSPORT_VIRTUAL` Transport type is Virtual. |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#close()() ` Releases all system resources and closes the connection to the HID device. |
| ` boolean` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object o) ` Indicates whether some other object is "equal to" this one. |
| ` void` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#getFeatureReport(int,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.hardware.hid.Report,java.lang.Exception>)(int reportId, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/os/OutcomeReceiver<https://developer.android.com/reference/android/hardware/hid/Report, https://developer.android.com/reference/java/lang/Exception> callback) ` Get a feature report from the HID device. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#getName()() ` The human-readable name of the HID device. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#getPhysicalAddress()() ` The physical address of the device, representing its connection path through the system's device tree (e.g., the USB hub and port path). |
| ` int` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#getProductId()() ` The product ID for this device. |
| ` byte[]` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#getReportDescriptor()() ` The raw HID report descriptor for the device. |
| ` int` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#getTransport()() ` The transport type used by this device. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#getUniqueId()() ` A unique identifier for this device instance. |
| ` int` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#getVendorId()() ` The vendor ID for this device. |
| ` int` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#hashCode()() ` Returns a hash code value for the object. |
| ` boolean` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#isOpen()() ` Returns whether the HID device is currently open and ready for communication. |
| ` void` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#open(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.hardware.hid.HidDevice,java.lang.Exception>)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/os/OutcomeReceiver<https://developer.android.com/reference/android/hardware/hid/HidDevice, https://developer.android.com/reference/java/lang/Exception> callback) ` Opens the HID device so that it can be used to send and receive HID reports. |
| ` void` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#registerEventListener(java.util.concurrent.Executor,%20android.hardware.hid.HidEventListener)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/hardware/hid/HidEventListener listener) ` Registers a listener to receive real-time input reports and hotplug events for this HID device. |
| ` void` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#sendFeatureReport(android.hardware.hid.Report,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,java.lang.Exception>)(https://developer.android.com/reference/android/hardware/hid/Report report, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/os/OutcomeReceiver<https://developer.android.com/reference/java/lang/Void, https://developer.android.com/reference/java/lang/Exception> callback) ` Send a feature report to the HID device. |
| ` void` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#sendOutputReport(android.hardware.hid.Report,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,java.lang.Exception>)(https://developer.android.com/reference/android/hardware/hid/Report report, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/os/OutcomeReceiver<https://developer.android.com/reference/java/lang/Void, https://developer.android.com/reference/java/lang/Exception> callback) ` Send an output report to the HID device. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/hardware/hid/HidDevice#unregisterEventListener(android.hardware.hid.HidEventListener)(https://developer.android.com/reference/android/hardware/hid/HidEventListener listener) ` Unregisters an active listener from receiving input reports. |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


From interface `

https://developer.android.com/reference/java/lang/AutoCloseable

` `
abstract


void` `
https://developer.android.com/reference/java/lang/AutoCloseable#close()()
`

Closes this resource, relinquishing any underlying resources.


## Constants

### TRANSPORT_BLUETOOTH

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int TRANSPORT_BLUETOOTH
```

Transport type is Bluetooth.

<br />

Constant Value:

5
(0x00000005)


### TRANSPORT_I2C

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int TRANSPORT_I2C
```

Transport type is I2C.

<br />

Constant Value:

24
(0x00000018)


### TRANSPORT_SPI

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int TRANSPORT_SPI
```

Transport type is SPI.

<br />

Constant Value:

28
(0x0000001c)


### TRANSPORT_UNKNOWN

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int TRANSPORT_UNKNOWN
```

Transport type is unknown.

<br />

Constant Value:

0
(0x00000000)


### TRANSPORT_USB

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int TRANSPORT_USB
```

Transport type is USB.

<br />

Constant Value:

3
(0x00000003)


### TRANSPORT_VIRTUAL

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int TRANSPORT_VIRTUAL
```

Transport type is Virtual.

<br />

Constant Value:

6
(0x00000006)


## Public methods

### close

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public void close ()
```

Releases all system resources and closes the connection to the HID device.

This method is synchronous and idempotent; calling it on an already closed
device has no effect.


Requires `https://developer.android.com/reference/android/Manifest.permission#ACCESS_HID`

<br />

### equals

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public boolean equals (Object o)
```

Indicates whether some other object is "equal to" this one.


The `equals` method implements an equivalence relation
on non-null object references:

- It is *reflexive*: for any non-null reference value `x`, `x.equals(x)` should return `true`.
- It is *symmetric*: for any non-null reference values `x` and `y`, `x.equals(y)` should return `true` if and only if `y.equals(x)` returns `true`.
- It is *transitive*: for any non-null reference values `x`, `y`, and `z`, if `x.equals(y)` returns `true` and `y.equals(z)` returns `true`, then `x.equals(z)` should return `true`.
- It is *consistent*: for any non-null reference values `x` and `y`, multiple invocations of `x.equals(y)` consistently return `true` or consistently return `false`, provided no information used in `equals` comparisons on the objects is modified.
- For any non-null reference value `x`, `x.equals(null)` should return `false`.


An equivalence relation partitions the elements it operates on
into *equivalence classes*; all the members of an
equivalence class are equal to each other. Members of an
equivalence class are substitutable for each other, at least
for some purposes.

<br />

| Parameters ||
|---|---|
| `o` | `Object`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this object is the same as the obj argument; `false` otherwise. <br /> |

### getFeatureReport

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public void getFeatureReport (int reportId, 
                Executor executor, 
                OutcomeReceiver<Report, Exception> callback)
```

Get a feature report from the HID device.

The device must be opened first before calling this method.

On success, `callback.onResult` is called with the retrieved `https://developer.android.com/reference/android/hardware/hid/Report`.
On failure, `callback.onError` is called with one of the following:

- `https://developer.android.com/reference/java/io/IOException`: If the underlying hardware device could not be accessed or the system service returned a failure.
- `https://developer.android.com/reference/java/lang/SecurityException`: If the caller lacks the required permission.

.   
Requires `https://developer.android.com/reference/android/Manifest.permission#ACCESS_HID`

<br />

<br />

| Parameters ||
|---|---|
| `reportId` | `int`: the feature report to get. <br /> |
| `executor` | `Executor`: the executor on which the callback will be invoked. This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `callback` | `OutcomeReceiver`: the callback object to be used to notify of the report or an error. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if the device is not open. |

### getName

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public String getName ()
```

The human-readable name of the HID device.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value cannot be `null`. <br /> |

### getPhysicalAddress

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public String getPhysicalAddress ()
```

The physical address of the device, representing its connection path through the system's
device tree (e.g., the USB hub and port path).

This value is unique to the device's physical connection point on the current system.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value cannot be `null`. <br /> |

### getProductId

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public int getProductId ()
```

The product ID for this device.

A product ID uniquely identifies which product within the address space of a given
vendor, identified by the device's vendor ID. A value of 0 will be assigned where a product
ID is not available.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getReportDescriptor

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public byte[] getReportDescriptor ()
```

The raw HID report descriptor for the device.

This descriptor defines the format and meaning of the reports sent and received by the
device, following the HID specification.

<br />

| Returns ||
|---|---|
| `byte[]` | This value cannot be `null`. <br /> |

### getTransport

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public int getTransport ()
```

The transport type used by this device.

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/hardware/hid/HidDevice#TRANSPORT_UNKNOWN` - `https://developer.android.com/reference/android/hardware/hid/HidDevice#TRANSPORT_USB` - `https://developer.android.com/reference/android/hardware/hid/HidDevice#TRANSPORT_BLUETOOTH` - `https://developer.android.com/reference/android/hardware/hid/HidDevice#TRANSPORT_SPI` - `https://developer.android.com/reference/android/hardware/hid/HidDevice#TRANSPORT_I2C` - `https://developer.android.com/reference/android/hardware/hid/HidDevice#TRANSPORT_VIRTUAL` |

### getUniqueId

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public String getUniqueId ()
```

A unique identifier for this device instance.

This value is typically the device's serial number if available, or a system-generated
unique ID. This ID is unique among all currently connected HID devices.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value cannot be `null`. <br /> |

### getVendorId

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public int getVendorId ()
```

The vendor ID for this device.

A vendor ID uniquely identifies the company who manufactured the device. A value of 0 will
be assigned where a vendor ID is not available.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### hashCode

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public int hashCode ()
```

Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
`https://developer.android.com/reference/java/util/HashMap`.


The general contract of `hashCode` is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the `hashCode` method must consistently return the same integer, provided no information used in `equals` comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce the same integer result.
- It is *not* required that if two objects are unequal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### isOpen

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public boolean isOpen ()
```

Returns whether the HID device is currently open and ready for communication.

Note: This method returns `false` while the device is in the process
of opening. It only returns `true` after the `https://developer.android.com/reference/android/hardware/hid/HidDevice#open(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.hardware.hid.HidDevice,java.lang.Exception>)` operation
has successfully completed.

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the device is fully opened; `false` otherwise. <br /> |

### open

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public void open (Executor executor, 
                OutcomeReceiver<HidDevice, Exception> callback)
```

Opens the HID device so that it can be used to send and receive HID reports.

This is an asynchronous operation. If an open operation is already in progress, the
provided callback is queued and will be notified once the underlying operation completes.
The state transitions are as follows:

- If the device is already **opened** , `callback.onResult` is invoked immediately.
- If the device is currently **opening** , the request is queued and `callback` will be notified when the existing operation finishes.
- If the device is **closed**, it transitions to an opening state and attempts to establish a connection via the system service.

On success, `callback.onResult` is called with this `https://developer.android.com/reference/android/hardware/hid/HidDevice` instance.
On failure, `callback.onError` is called with one of the following:

- `https://developer.android.com/reference/java/io/IOException`: If the underlying hardware device (e.g., hidraw node) could not be accessed or the system service returned a failure.
- `https://developer.android.com/reference/java/lang/SecurityException`: If the caller lacks the required permission, or the user has rejected access to the device.
- `https://developer.android.com/reference/android/os/RemoteException`: If the HID system service is unreachable.

.   
Requires `https://developer.android.com/reference/android/Manifest.permission#ACCESS_HID`

<br />

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: The executor on which the callback will be invoked. This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `callback` | `OutcomeReceiver`: The object to be notified of success or failure. This value cannot be `null`. <br /> |

### registerEventListener

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public void registerEventListener (Executor executor, 
                HidEventListener listener)
```

Registers a listener to receive real-time input reports and hotplug events
for this HID device. If the listener is already registered, this call does nothing.


Requires `https://developer.android.com/reference/android/Manifest.permission#ACCESS_HID`

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: The executor on which callback events will be executed. This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `listener` | `HidEventListener`: The callback listener to register. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | If the device is not open or FMQ session establishment fails. |

### sendFeatureReport

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public void sendFeatureReport (Report report, 
                Executor executor, 
                OutcomeReceiver<Void, Exception> callback)
```

Send a feature report to the HID device.

The device must be opened first before calling this method.

On success, `callback.onResult` is called with `null`.
On failure, `callback.onError` is called with one of the following:

- `https://developer.android.com/reference/java/io/IOException`: If the underlying hardware device could not be accessed or the system service returned a failure.
- `https://developer.android.com/reference/java/lang/SecurityException`: If the caller lacks the required permission.

.   
Requires `https://developer.android.com/reference/android/Manifest.permission#ACCESS_HID`

<br />

<br />

| Parameters ||
|---|---|
| `report` | `Report`: the feature report to send. This value cannot be `null`. <br /> |
| `executor` | `Executor`: the executor on which the callback will be invoked. This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `callback` | `OutcomeReceiver`: the callback object to be used to notify of an error. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if the device is not open. |

### sendOutputReport

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public void sendOutputReport (Report report, 
                Executor executor, 
                OutcomeReceiver<Void, Exception> callback)
```

Send an output report to the HID device.

The device must be opened first before calling this method.

On success, `callback.onResult` is called with `null`.
On failure, `callback.onError` is called with one of the following:

- `https://developer.android.com/reference/java/io/IOException`: If the underlying hardware device could not be accessed or the system service returned a failure.
- `https://developer.android.com/reference/java/lang/SecurityException`: If the caller lacks the required permission.

.   
Requires `https://developer.android.com/reference/android/Manifest.permission#ACCESS_HID`

<br />

<br />

| Parameters ||
|---|---|
| `report` | `Report`: the output report to send. This value cannot be `null`. <br /> |
| `executor` | `Executor`: the executor on which the callback will be invoked. This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `callback` | `OutcomeReceiver`: the callback object to be used to notify of an error. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if the device is not open. |

### toString

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### unregisterEventListener

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public void unregisterEventListener (HidEventListener listener)
```

Unregisters an active listener from receiving input reports.

<br />

| Parameters ||
|---|---|
| `listener` | `HidEventListener`: The callback listener to unregister. This value cannot be `null`. <br /> |