InputDriver
public
class
InputDriver
extends Object
java.lang.Object | |
↳ | com.google.android.things.userdriver.input.InputDriver |
Driver to interface with user-connected input devices. User defined drivers should instantiate this class and call the appropriate emit method whenever input events are ready.
Summary
Nested classes | |
---|---|
class |
InputDriver.Builder
Builder class for |
Public methods | |
---|---|
void
|
emit(InputDriverEvent event)
Emit a single driver event. |
Inherited methods | |
---|---|
![]()
java.lang.Object
|
Public methods
emit
void emit (InputDriverEvent event)
Emit a single driver event.
Parameters | |
---|---|
event |
InputDriverEvent : The event to emit. |
Throws | |
---|---|
IllegalArgumentException |
if the given key is not in the list of keys configured for this driver. IllegalStateException if the driver is not yet registered with the UserDriverManager. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# InputDriver\n\nSummary: [Nested Classes](#nestedclasses) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \\| [\\[Expand All\\]](#) \n\nInputDriver\n===========\n\n\n`\npublic\n\n\nclass\nInputDriver\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|--------------------------------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | com.google.android.things.userdriver.input.InputDriver |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nDriver to interface with user-connected input devices.\n\nUser defined drivers should instantiate this class and call the appropriate emit method whenever\ninput events are ready.\n\nSummary\n-------\n\n| ### Nested classes ||\n|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` class` | [InputDriver.Builder](/reference/com/google/android/things/userdriver/input/InputDriver.Builder) Builder class for [InputDriver](/reference/com/google/android/things/userdriver/input/InputDriver) objects. |\n\n| ### Public methods ||\n|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` void` | ` `[emit](/reference/com/google/android/things/userdriver/input/InputDriver#emit(com.google.android.things.userdriver.input.InputDriverEvent))`(`[InputDriverEvent](/reference/com/google/android/things/userdriver/input/InputDriverEvent)` event) ` Emit a single driver event. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/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 `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long, int))`(long millis, int nanos) ` Causes the current thread to wait until another thread invokes the [notify()](https://developer.android.com/reference/java/lang/Object.html#notify()) method or the [notifyAll()](https://developer.android.com/reference/java/lang/Object.html#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](/reference/java/lang/Object#wait(long))`(long millis) ` Causes the current thread to wait until either another thread invokes the [notify()](https://developer.android.com/reference/java/lang/Object.html#notify()) method or the [notifyAll()](https://developer.android.com/reference/java/lang/Object.html#notifyAll()) method for this object, or a specified amount of time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until another thread invokes the [notify()](https://developer.android.com/reference/java/lang/Object.html#notify()) method or the [notifyAll()](https://developer.android.com/reference/java/lang/Object.html#notifyAll()) method for this object. | ||\n\nPublic methods\n--------------\n\n### emit\n\n```\nvoid emit (InputDriverEvent event)\n```\n\nEmit a single driver event.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|-----------------------------------------------|\n| `event` | `InputDriverEvent`: The event to emit. \u003cbr /\u003e |\n\n| Throws ||\n|---------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [IllegalArgumentException](/reference/java/lang/IllegalArgumentException) | if the given key is not in the list of keys configured for this driver. IllegalStateException if the driver is not yet registered with the UserDriverManager. |\n\n-\n\n Classes\n -------\n\n - [InputDriver](/reference/com/google/android/things/userdriver/input/InputDriver)\n - [InputDriver.Builder](/reference/com/google/android/things/userdriver/input/InputDriver.Builder)\n - [InputDriverEvent](/reference/com/google/android/things/userdriver/input/InputDriverEvent)"]]