Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#pubctors) \| [Methods](https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#inhmethods)

# TvInputManager.TvInputCallback

*** ** * ** ***


`
public
static

abstract
class
TvInputManager.TvInputCallback
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.media.tv.TvInputManager.TvInputCallback |

<br />

*** ** * ** ***

Callback used to monitor status of the TV inputs.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#TvInputCallback()() ` |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#onInputAdded(java.lang.String)(https://developer.android.com/reference/java/lang/String inputId) ` This is called when a TV input is added to the system. |
| ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#onInputRemoved(java.lang.String)(https://developer.android.com/reference/java/lang/String inputId) ` This is called when a TV input is removed from the system. |
| ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#onInputStateChanged(java.lang.String,%20int)(https://developer.android.com/reference/java/lang/String inputId, int state) ` This is called when the state of a given TV input is changed. |
| ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#onInputUpdated(java.lang.String)(https://developer.android.com/reference/java/lang/String inputId) ` This is called when a TV input is updated on the system. |
| ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#onTvInputInfoUpdated(android.media.tv.TvInputInfo)(https://developer.android.com/reference/android/media/tv/TvInputInfo inputInfo) ` This is called when the information about an existing TV input has been updated. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/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 https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Public constructors

### TvInputCallback

```
public TvInputCallback ()
```

<br />

<br />

## Public methods

### onInputAdded

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

```
public void onInputAdded (String inputId)
```

This is called when a TV input is added to the system.

Normally it happens when the user installs a new TV input package that implements
`https://developer.android.com/reference/android/media/tv/TvInputService` interface.

<br />

| Parameters ||
|---|---|
| `inputId` | `String`: The ID of the TV input. <br /> |

### onInputRemoved

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

```
public void onInputRemoved (String inputId)
```

This is called when a TV input is removed from the system.

Normally it happens when the user uninstalls the previously installed TV input
package.

<br />

| Parameters ||
|---|---|
| `inputId` | `String`: The ID of the TV input. <br /> |

### onInputStateChanged

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

```
public void onInputStateChanged (String inputId, 
                int state)
```

This is called when the state of a given TV input is changed.

<br />

| Parameters ||
|---|---|
| `inputId` | `String`: The ID of the TV input. <br /> |
| `state` | `int`: State of the TV input. The value is one of the following: - `https://developer.android.com/reference/android/media/tv/TvInputManager#INPUT_STATE_CONNECTED` - `https://developer.android.com/reference/android/media/tv/TvInputManager#INPUT_STATE_CONNECTED_STANDBY` - `https://developer.android.com/reference/android/media/tv/TvInputManager#INPUT_STATE_DISCONNECTED` . Value is one of the following: - `https://developer.android.com/reference/android/media/tv/TvInputManager#INPUT_STATE_CONNECTED` - `https://developer.android.com/reference/android/media/tv/TvInputManager#INPUT_STATE_CONNECTED_STANDBY` - `https://developer.android.com/reference/android/media/tv/TvInputManager#INPUT_STATE_DISCONNECTED` |

### onInputUpdated

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

```
public void onInputUpdated (String inputId)
```

This is called when a TV input is updated on the system.

Normally it happens when a previously installed TV input package is re-installed or
the media on which a newer version of the package exists becomes available/unavailable.

<br />

| Parameters ||
|---|---|
| `inputId` | `String`: The ID of the TV input. <br /> |

### onTvInputInfoUpdated

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

```
public void onTvInputInfoUpdated (TvInputInfo inputInfo)
```

This is called when the information about an existing TV input has been updated.

Because the system automatically creates a `TvInputInfo` object for each TV
input based on the information collected from the `AndroidManifest.xml`, this
method is only called back when such information has changed dynamically.

<br />

| Parameters ||
|---|---|
| `inputInfo` | `TvInputInfo`: The `TvInputInfo` object that contains new information. <br /> |