# InputManager.InputDeviceListener

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

# InputManager.InputDeviceListener

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/hardware/input/InputManager.InputDeviceListener "View this page in Kotlin")\|Java

`
public
static


interface
InputManager.InputDeviceListener
`  
`


`

|---------------------------------------------------------|
| android.hardware.input.InputManager.InputDeviceListener |

<br />

*** ** * ** ***

Listens for changes in input devices.

## Summary

|                                                                                                                                  ### Public methods                                                                                                                                  ||
|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onInputDeviceAdded](https://developer.android.com/reference/android/hardware/input/InputManager.InputDeviceListener#onInputDeviceAdded(int))`(int deviceId) ` Called whenever an input device has been added to the system.                                    |
| ` abstract void` | ` `[onInputDeviceChanged](https://developer.android.com/reference/android/hardware/input/InputManager.InputDeviceListener#onInputDeviceChanged(int))`(int deviceId) ` Called whenever the properties of an input device have changed since they were last queried. |
| ` abstract void` | ` `[onInputDeviceRemoved](https://developer.android.com/reference/android/hardware/input/InputManager.InputDeviceListener#onInputDeviceRemoved(int))`(int deviceId) ` Called whenever an input device has been removed from the system.                            |

## Public methods

### onInputDeviceAdded

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract void onInputDeviceAdded (int deviceId)
```

Called whenever an input device has been added to the system. Use[InputManager.getInputDevice(int)](https://developer.android.com/reference/android/hardware/input/InputManager#getInputDevice(int))to get more information about the device.

<br />

|                              Parameters                              ||
|------------|----------------------------------------------------------|
| `deviceId` | `int`: The id of the input device that was added. <br /> |

### onInputDeviceChanged

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract void onInputDeviceChanged (int deviceId)
```

Called whenever the properties of an input device have changed since they were last queried. Use[InputManager.getInputDevice](https://developer.android.com/reference/android/hardware/input/InputManager#getInputDevice(int))to get a fresh[InputDevice](https://developer.android.com/reference/android/view/InputDevice)object with the new properties.

<br />

|                             Parameters                             ||
|------------|--------------------------------------------------------|
| `deviceId` | `int`: The id of the input device that changed. <br /> |

### onInputDeviceRemoved

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract void onInputDeviceRemoved (int deviceId)
```

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

<br />

|                               Parameters                               ||
|------------|------------------------------------------------------------|
| `deviceId` | `int`: The id of the input device that was removed. <br /> |