# InputQueue.Callback

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

# Callback

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/view/InputQueue.Callback "View this page in Java")  

```
interface Callback
```

|----------------------------------------------------------------------------------------------------------------------|
| [android.view.InputQueue.Callback](https://developer.android.com/reference/kotlin/android/view/InputQueue.Callback#) |

|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Direct Subclasses [NativeActivity](https://developer.android.com/reference/kotlin/android/app/NativeActivity.html#) |---------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------| | [NativeActivity](https://developer.android.com/reference/kotlin/android/app/NativeActivity.html#) | Convenience for implementing an activity that will be implemented purely in native code. | |

Interface to receive notification of when an InputQueue is associated and dissociated with a thread.

## Summary

|                                                                                                                                                                                                                                Public methods                                                                                                                                                                                                                                ||
|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onInputQueueCreated](https://developer.android.com/reference/kotlin/android/view/InputQueue.Callback#onInputQueueCreated(android.view.InputQueue))`(`queue:` `[InputQueue](https://developer.android.com/reference/kotlin/android/view/InputQueue)!`)` Called when the given InputQueue is now associated with the thread making this call, so it can start receiving events from it. |
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onInputQueueDestroyed](https://developer.android.com/reference/kotlin/android/view/InputQueue.Callback#onInputQueueDestroyed(android.view.InputQueue))`(`queue:` `[InputQueue](https://developer.android.com/reference/kotlin/android/view/InputQueue)!`)` Called when the given InputQueue is no longer associated with the thread and thus not dispatching events.                  |

## Public methods

### onInputQueueCreated

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

```
abstract fun onInputQueueCreated(queue: InputQueue!): Unit
```

Called when the given InputQueue is now associated with the thread making this call, so it can start receiving events from it.  

### onInputQueueDestroyed

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

```
abstract fun onInputQueueDestroyed(queue: InputQueue!): Unit
```

Called when the given InputQueue is no longer associated with the thread and thus not dispatching events.