Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public static interface

InputManager.InputDeviceListener

android.hardware.input.InputManager.InputDeviceListener

Class Overview

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

public abstract 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 The id of the input device that was added.

public abstract 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 The id of the input device that changed.

public abstract void onInputDeviceRemoved (int deviceId)

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

Parameters
deviceId The id of the input device that was removed.