Skip to content

Most visited

Recently visited

navigation
Added in API level 16

InputManager.InputDeviceListener

public static interface InputManager.InputDeviceListener

android.hardware.input.InputManager.InputDeviceListener


Listens for changes in input devices.

Summary

Public methods

abstract void onInputDeviceAdded(int deviceId)

Called whenever an input device has been added to the system.

abstract void onInputDeviceChanged(int deviceId)

Called whenever the properties of an input device have changed since they were last queried.

abstract void onInputDeviceRemoved(int deviceId)

Called whenever an input device has been removed from the system.

Public methods

onInputDeviceAdded

Added in API level 16
void onInputDeviceAdded (int deviceId)

Called whenever an input device has been added to the system. Use getInputDevice(int) to get more information about the device.

Parameters
deviceId int: The id of the input device that was added.

onInputDeviceChanged

Added in API level 16
void onInputDeviceChanged (int deviceId)

Called whenever the properties of an input device have changed since they were last queried. Use getInputDevice(int) to get a fresh InputDevice object with the new properties.

Parameters
deviceId int: The id of the input device that changed.

onInputDeviceRemoved

Added in API level 16
void onInputDeviceRemoved (int deviceId)

Called whenever an input device has been removed from the system.

Parameters
deviceId int: The id of the input device that was removed.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.