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

# TvInputManager

*** ** * ** ***


`
public

final

class
TvInputManager
`


`

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


`

`


`

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

<br />

*** ** * ** ***

Central system API to the overall TV input framework (TIF) architecture, which arbitrates
interaction between applications and the selected TV inputs.

There are three primary parties involved in the TV input framework (TIF) architecture:

- The **TV input manager** as expressed by this class is the central point of the system that manages interaction between all other parts. It is expressed as the client-side API here which exists in each application context and communicates with a global system service that manages the interaction across all processes.
- A **TV input** implemented by `https://developer.android.com/reference/android/media/tv/TvInputService` represents an input source of TV, which can be a pass-through input such as HDMI, or a tuner input which provides broadcast TV programs. The system binds to the TV input per application\\u2019s request. on implementing TV inputs.
- **Applications** talk to the TV input manager to list TV inputs and check their status. Once an application find the input to use, it uses `https://developer.android.com/reference/android/media/tv/TvView` or `https://developer.android.com/reference/android/media/tv/TvRecordingClient` for further interaction such as watching and recording broadcast TV programs.

<br />

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback` Callback used to monitor status of the TV inputs. |

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#ACTION_BLOCKED_RATINGS_CHANGED` Broadcast intent action when the user blocked content ratings change. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED` Broadcast intent action when the parental controls enabled state changes. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#ACTION_QUERY_CONTENT_RATING_SYSTEMS` Broadcast intent action used to query available content rating systems. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#ACTION_SETUP_INPUTS` Activity action to set up channel sources i.e. TV inputs of type `https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_TUNER`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#ACTION_VIEW_RECORDING_SCHEDULES` Activity action to display the recording schedules. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#BROADCAST_INFO_STREAM_EVENT` |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#BROADCAST_INFO_TYPE_COMMAND` |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#BROADCAST_INFO_TYPE_DSMCC` |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#BROADCAST_INFO_TYPE_PES` |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#BROADCAST_INFO_TYPE_SECTION` |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#BROADCAST_INFO_TYPE_TABLE` |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#BROADCAST_INFO_TYPE_TIMELINE` |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#BROADCAST_INFO_TYPE_TS` |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#INPUT_STATE_CONNECTED` State for `https://developer.android.com/reference/android/media/tv/TvInputManager#getInputState(java.lang.String)` and `https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#onInputStateChanged(java.lang.String,%20int)`: The input source is connected. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#INPUT_STATE_CONNECTED_STANDBY` State for `https://developer.android.com/reference/android/media/tv/TvInputManager#getInputState(java.lang.String)` and `https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#onInputStateChanged(java.lang.String,%20int)`: The input source is connected but in standby mode. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#INPUT_STATE_DISCONNECTED` State for `https://developer.android.com/reference/android/media/tv/TvInputManager#getInputState(java.lang.String)` and `https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#onInputStateChanged(java.lang.String,%20int)`: The input source is disconnected. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#META_DATA_CONTENT_RATING_SYSTEMS` Content rating systems metadata associated with `https://developer.android.com/reference/android/media/tv/TvInputManager#ACTION_QUERY_CONTENT_RATING_SYSTEMS`. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#RECORDING_ERROR_INSUFFICIENT_SPACE` Error for `https://developer.android.com/reference/android/media/tv/TvInputService.RecordingSession#notifyError(int)` and `https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int)`: Recording cannot proceed due to insufficient storage space. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#RECORDING_ERROR_RESOURCE_BUSY` Error for `https://developer.android.com/reference/android/media/tv/TvInputService.RecordingSession#notifyError(int)` and `https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int)`: Recording cannot proceed because a required recording resource was not able to be allocated. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#RECORDING_ERROR_UNKNOWN` Error for `https://developer.android.com/reference/android/media/tv/TvInputService.RecordingSession#notifyError(int)` and `https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int)`: The requested operation cannot be completed due to a problem that does not fit under any other error codes, or the error code for the problem is defined on the higher version than application's `android:targetSdkVersion`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_AD_BUFFER` An object of `https://developer.android.com/reference/android/media/tv/AdBuffer`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_AD_RESPONSE` An object of `https://developer.android.com/reference/android/media/tv/AdResponse`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_BROADCAST_INFO_RESPONSE` An object of `https://developer.android.com/reference/android/media/tv/BroadcastInfoResponse`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_CHANNEL_URI` The URI of a channel. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_TRACKS` A list which includes track information. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_TRACK_ID` The ID of the track. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_TRACK_TYPE` The type of the track. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_TV_MESSAGE_TYPE` The type of TV message. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_VIDEO_UNAVAILABLE_REASON` The reason why the video became unavailable. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_TYPE_AD_BUFFER_CONSUMED` Notifies the advertisement buffer is consumed. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_TYPE_AD_RESPONSE` Notifies response for advertisement. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_TYPE_BROADCAST_INFO_RESPONSE` Notifies response for broadcast info. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_TYPE_TRACKS_CHANGED` Sends the list of all audio/video/subtitle tracks. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_TYPE_TRACK_SELECTED` Sends the type and ID of a selected track. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_TYPE_TUNED` Informs the application that the session has been tuned to the given channel. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_TYPE_TV_MESSAGE` Sends the TV message. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_TYPE_VIDEO_AVAILABLE` Informs the application that the video is now available for watching. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_TYPE_VIDEO_UNAVAILABLE` Informs the application that the video became unavailable for some reason. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SIGNAL_STRENGTH_LOST` Signal lost. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SIGNAL_STRENGTH_STRONG` Strong signal. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#SIGNAL_STRENGTH_WEAK` Weak signal. |
| `long` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TIME_SHIFT_INVALID_TIME` Value returned by `https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTimeShiftGetCurrentPosition()` and `https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTimeShiftGetStartPosition()` when time shifting has not yet started. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TIME_SHIFT_MODE_AUTO` Time shift mode: auto. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TIME_SHIFT_MODE_LOCAL` Time shift mode: local. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TIME_SHIFT_MODE_NETWORK` Time shift mode: network. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TIME_SHIFT_MODE_OFF` Time shift mode: off. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TIME_SHIFT_STATUS_AVAILABLE` Status for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTimeShiftStatusChanged(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onTimeShiftStatusChanged(java.lang.String,%20int)`: Time shifting is currently available. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TIME_SHIFT_STATUS_UNAVAILABLE` Status for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTimeShiftStatusChanged(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onTimeShiftStatusChanged(java.lang.String,%20int)`: Time shifting is currently unavailable but might work again later. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TIME_SHIFT_STATUS_UNKNOWN` Status for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTimeShiftStatusChanged(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onTimeShiftStatusChanged(java.lang.String,%20int)`: Unknown status. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TIME_SHIFT_STATUS_UNSUPPORTED` Status for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTimeShiftStatusChanged(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onTimeShiftStatusChanged(java.lang.String,%20int)`: The current TV input does not support time shifting. |
| `long` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_GROUP_ID_NONE` This value for `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_KEY_GROUP_ID` denotes that the message doesn't belong to any group. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_KEY_GROUP_ID` This constant is used as a `https://developer.android.com/reference/android/os/Bundle` key for TV messages. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_KEY_RAW_DATA` This constant is used as a `https://developer.android.com/reference/android/os/Bundle` key for TV messages. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_KEY_STREAM_ID` This constant is used as a `https://developer.android.com/reference/android/os/Bundle` key for TV messages. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_KEY_SUBTYPE` This constant is used as a `https://developer.android.com/reference/android/os/Bundle` key for TV messages. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_SUBTYPE_CC_608E` This is a subtype for TV messages that can be potentially found as a value at `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_KEY_SUBTYPE`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_SUBTYPE_WATERMARKING_A335` This is a subtype for TV messages that can be potentially found as a value at `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_KEY_SUBTYPE`. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_TYPE_CLOSED_CAPTION` Indicates that this TV message contains Closed Captioning data |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_TYPE_OTHER` Indicates that this TV message contains other data |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_TYPE_WATERMARK` Indicates that this TV message contains watermarking data |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_AUDIO_ONLY` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because the current TV program is audio-only. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_BUFFERING` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because the corresponding TV input has stopped playback temporarily to buffer more data. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_CAS_BLACKOUT` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because of a geographical blackout. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_CAS_CARD_INVALID` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because smart card is invalid. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_CAS_CARD_MUTE` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because smart card is muted. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_CAS_INSUFFICIENT_OUTPUT_PROTECTION` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because the output protection level enabled on the device is not sufficient to meet the requirements in the license policy. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_CAS_LICENSE_EXPIRED` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because Using a license in whhich the keys have expired. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_CAS_NEED_ACTIVATION` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because the device need be activated. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_CAS_NEED_PAIRING` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because the device need be paired. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_CAS_NO_CARD` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because smart card is missed. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_CAS_PVR_RECORDING_NOT_ALLOWED` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because the PVR record is not allowed by the license policy. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_CAS_REBOOTING` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because CAS system is rebooting. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_CAS_UNKNOWN` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because of unknown CAS error. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_INSUFFICIENT_RESOURCE` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because the resource is not enough to meet requirement. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_NOT_CONNECTED` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because the source is not physically connected, for example the HDMI cable is not connected. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_STOPPED` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because it has been stopped by `https://developer.android.com/reference/android/media/tv/TvView#stopPlayback(int)`. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_TUNING` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because the corresponding TV input is in the middle of tuning to a new channel. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_UNKNOWN` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable due to an unspecified error. |
| `int` | `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_WEAK_SIGNAL` Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and `https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable due to weak TV signal. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/media/tv/TvContentRating>` | ` https://developer.android.com/reference/android/media/tv/TvInputManager#getBlockedRatings()() ` Returns the list of blocked content ratings. |
| ` int` | ` https://developer.android.com/reference/android/media/tv/TvInputManager#getInputState(java.lang.String)(https://developer.android.com/reference/java/lang/String inputId) ` Returns the state of a given TV input. |
| ` https://developer.android.com/reference/android/media/tv/TvInputInfo` | ` https://developer.android.com/reference/android/media/tv/TvInputManager#getTvInputInfo(java.lang.String)(https://developer.android.com/reference/java/lang/String inputId) ` Returns the `https://developer.android.com/reference/android/media/tv/TvInputInfo` for a given TV input. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/media/tv/TvInputInfo>` | ` https://developer.android.com/reference/android/media/tv/TvInputManager#getTvInputList()() ` Returns the complete list of TV inputs on the system. |
| ` boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputManager#isParentalControlsEnabled()() ` Returns the user's parental controls enabled state. |
| ` boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputManager#isRatingBlocked(android.media.tv.TvContentRating)(https://developer.android.com/reference/android/media/tv/TvContentRating rating) ` Checks whether a given TV content rating is blocked by the user. |
| ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputManager#registerCallback(android.media.tv.TvInputManager.TvInputCallback,%20android.os.Handler)(https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback callback, https://developer.android.com/reference/android/os/Handler handler) ` Registers a `https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback`. |
| ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputManager#unregisterCallback(android.media.tv.TvInputManager.TvInputCallback)(https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback callback) ` Unregisters the existing `https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback`. |
| ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputManager#updateTvInputInfo(android.media.tv.TvInputInfo)(https://developer.android.com/reference/android/media/tv/TvInputInfo inputInfo) ` Updates the `TvInputInfo` for an existing TV input. |

### 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*.


## Constants

### ACTION_BLOCKED_RATINGS_CHANGED

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

```
public static final String ACTION_BLOCKED_RATINGS_CHANGED
```

Broadcast intent action when the user blocked content ratings change. For use with the
`https://developer.android.com/reference/android/media/tv/TvInputManager#isRatingBlocked(android.media.tv.TvContentRating)`.

<br />

Constant Value:

"android.media.tv.action.BLOCKED_RATINGS_CHANGED"


### ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED

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

```
public static final String ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED
```

Broadcast intent action when the parental controls enabled state changes. For use with the
`https://developer.android.com/reference/android/media/tv/TvInputManager#isParentalControlsEnabled()`.

<br />

Constant Value:

"android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED"


### ACTION_QUERY_CONTENT_RATING_SYSTEMS

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

```
public static final String ACTION_QUERY_CONTENT_RATING_SYSTEMS
```

Broadcast intent action used to query available content rating systems.

The TV input manager service locates available content rating systems by querying
broadcast receivers that are registered for this action. An application can offer additional
content rating systems to the user by declaring a suitable broadcast receiver in its
manifest.

Here is an example broadcast receiver declaration that an application might include in its
AndroidManifest.xml to advertise custom content rating systems. The meta-data specifies a
resource that contains a description of each content rating system that is provided by the
application.

<br />

```
<receiver android:name=".TvInputReceiver">
    <intent-filter>
        <action android:name=
                "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS" />
    </intent-filter>
    <meta-data
            android:name="android.media.tv.metadata.CONTENT_RATING_SYSTEMS"
            android:resource="@xml/tv_content_rating_systems" />
</receiver>
```

In the above example, the `@xml/tv_content_rating_systems` resource refers to an
XML resource whose root element is `<rating-system-definitions>` that
contains zero or more `<rating-system-definition>` elements. Each `
<rating-system-definition>` element specifies the ratings, sub-ratings and rating
orders of a particular content rating system.

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvContentRating`

Constant Value:

"android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS"


### ACTION_SETUP_INPUTS

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

```
public static final String ACTION_SETUP_INPUTS
```

Activity action to set up channel sources i.e. TV inputs of type
`https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_TUNER`. When invoked, the system will display an appropriate UI for
the user to initiate the individual setup flow provided by
`https://developer.android.com/reference/android/R.attr#setupActivity` of each TV input service.

<br />

Constant Value:

"android.media.tv.action.SETUP_INPUTS"


### ACTION_VIEW_RECORDING_SCHEDULES

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

```
public static final String ACTION_VIEW_RECORDING_SCHEDULES
```

Activity action to display the recording schedules. When invoked, the system will display an
appropriate UI to browse the schedules.

<br />

Constant Value:

"android.media.tv.action.VIEW_RECORDING_SCHEDULES"


### BROADCAST_INFO_STREAM_EVENT

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

```
public static final int BROADCAST_INFO_STREAM_EVENT
```

<br />

<br />

Constant Value:

5
(0x00000005)


### BROADCAST_INFO_TYPE_COMMAND

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

```
public static final int BROADCAST_INFO_TYPE_COMMAND
```

<br />

<br />

Constant Value:

7
(0x00000007)


### BROADCAST_INFO_TYPE_DSMCC

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

```
public static final int BROADCAST_INFO_TYPE_DSMCC
```

<br />

<br />

Constant Value:

6
(0x00000006)


### BROADCAST_INFO_TYPE_PES

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

```
public static final int BROADCAST_INFO_TYPE_PES
```

<br />

<br />

Constant Value:

4
(0x00000004)


### BROADCAST_INFO_TYPE_SECTION

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

```
public static final int BROADCAST_INFO_TYPE_SECTION
```

<br />

<br />

Constant Value:

3
(0x00000003)


### BROADCAST_INFO_TYPE_TABLE

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

```
public static final int BROADCAST_INFO_TYPE_TABLE
```

<br />

<br />

Constant Value:

2
(0x00000002)


### BROADCAST_INFO_TYPE_TIMELINE

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

```
public static final int BROADCAST_INFO_TYPE_TIMELINE
```

<br />

<br />

Constant Value:

8
(0x00000008)


### BROADCAST_INFO_TYPE_TS

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

```
public static final int BROADCAST_INFO_TYPE_TS
```

<br />

<br />

Constant Value:

1
(0x00000001)


### INPUT_STATE_CONNECTED

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

```
public static final int INPUT_STATE_CONNECTED
```

State for `https://developer.android.com/reference/android/media/tv/TvInputManager#getInputState(java.lang.String)` and
`https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#onInputStateChanged(java.lang.String,%20int)`: The input source is connected.

This state indicates that a source device is connected to the input port and is in the
normal operation mode. It is mostly relevant to hardware inputs such as HDMI input.
Non-hardware inputs are considered connected all the time.

<br />

Constant Value:

0
(0x00000000)


### INPUT_STATE_CONNECTED_STANDBY

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

```
public static final int INPUT_STATE_CONNECTED_STANDBY
```

State for `https://developer.android.com/reference/android/media/tv/TvInputManager#getInputState(java.lang.String)` and
`https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#onInputStateChanged(java.lang.String,%20int)`: The input source is connected but
in standby mode.

This state indicates that a source device is connected to the input port but is in standby
or low power mode. It is mostly relevant to hardware inputs such as HDMI input and Component
inputs.

<br />

Constant Value:

1
(0x00000001)


### INPUT_STATE_DISCONNECTED

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

```
public static final int INPUT_STATE_DISCONNECTED
```

State for `https://developer.android.com/reference/android/media/tv/TvInputManager#getInputState(java.lang.String)` and
`https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#onInputStateChanged(java.lang.String,%20int)`: The input source is disconnected.

This state indicates that a source device is disconnected from the input port. It is
mostly relevant to hardware inputs such as HDMI input.

<br />

Constant Value:

2
(0x00000002)


### META_DATA_CONTENT_RATING_SYSTEMS

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

```
public static final String META_DATA_CONTENT_RATING_SYSTEMS
```

Content rating systems metadata associated with `https://developer.android.com/reference/android/media/tv/TvInputManager#ACTION_QUERY_CONTENT_RATING_SYSTEMS`.

Specifies the resource ID of an XML resource that describes the content rating systems
that are provided by the application.

<br />

Constant Value:

"android.media.tv.metadata.CONTENT_RATING_SYSTEMS"


### RECORDING_ERROR_INSUFFICIENT_SPACE

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

```
public static final int RECORDING_ERROR_INSUFFICIENT_SPACE
```

Error for `https://developer.android.com/reference/android/media/tv/TvInputService.RecordingSession#notifyError(int)` and
`https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int)`: Recording cannot proceed due to
insufficient storage space.

<br />

Constant Value:

1
(0x00000001)


### RECORDING_ERROR_RESOURCE_BUSY

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

```
public static final int RECORDING_ERROR_RESOURCE_BUSY
```

Error for `https://developer.android.com/reference/android/media/tv/TvInputService.RecordingSession#notifyError(int)` and
`https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int)`: Recording cannot proceed because
a required recording resource was not able to be allocated.

<br />

Constant Value:

2
(0x00000002)


### RECORDING_ERROR_UNKNOWN

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

```
public static final int RECORDING_ERROR_UNKNOWN
```

Error for `https://developer.android.com/reference/android/media/tv/TvInputService.RecordingSession#notifyError(int)` and
`https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int)`: The requested operation cannot be
completed due to a problem that does not fit under any other error codes, or the error code
for the problem is defined on the higher version than application's
`android:targetSdkVersion`.

<br />

Constant Value:

0
(0x00000000)


### SESSION_DATA_KEY_AD_BUFFER

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

```
public static final String SESSION_DATA_KEY_AD_BUFFER
```

An object of `https://developer.android.com/reference/android/media/tv/AdBuffer`.

Type: android.media.tv.AdBuffer

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`

Constant Value:

"ad_buffer"


### SESSION_DATA_KEY_AD_RESPONSE

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

```
public static final String SESSION_DATA_KEY_AD_RESPONSE
```

An object of `https://developer.android.com/reference/android/media/tv/AdResponse`.

Type: android.media.tv.AdResponse

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`

Constant Value:

"ad_response"


### SESSION_DATA_KEY_BROADCAST_INFO_RESPONSE

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

```
public static final String SESSION_DATA_KEY_BROADCAST_INFO_RESPONSE
```

An object of `https://developer.android.com/reference/android/media/tv/BroadcastInfoResponse`.

Type: android.media.tv.BroadcastInfoResponse

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`

Constant Value:

"broadcast_info_response"


### SESSION_DATA_KEY_CHANNEL_URI

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

```
public static final String SESSION_DATA_KEY_CHANNEL_URI
```

The URI of a channel.

Type: android.net.Uri

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`

Constant Value:

"channel_uri"


### SESSION_DATA_KEY_TRACKS

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

```
public static final String SESSION_DATA_KEY_TRACKS
```

A list which includes track information.

Type: `java.util.List<android.media.tv.TvTrackInfo> `

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`

Constant Value:

"tracks"


### SESSION_DATA_KEY_TRACK_ID

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

```
public static final String SESSION_DATA_KEY_TRACK_ID
```

The ID of the track.

Type: String

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvTrackInfo#getId()`
- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`

Constant Value:

"track_id"


### SESSION_DATA_KEY_TRACK_TYPE

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

```
public static final String SESSION_DATA_KEY_TRACK_TYPE
```

The type of the track.

One of `https://developer.android.com/reference/android/media/tv/TvTrackInfo#TYPE_AUDIO`, `https://developer.android.com/reference/android/media/tv/TvTrackInfo#TYPE_VIDEO`,
`https://developer.android.com/reference/android/media/tv/TvTrackInfo#TYPE_SUBTITLE`.

Type: Integer

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvTrackInfo#getType()`
- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`

Constant Value:

"track_type"


### SESSION_DATA_KEY_TV_MESSAGE_TYPE

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

```
public static final String SESSION_DATA_KEY_TV_MESSAGE_TYPE
```

The type of TV message.

It can be one of `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_TYPE_WATERMARK`,
`https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_TYPE_CLOSED_CAPTION`, `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_TYPE_OTHER`

Type: Integer

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`

Constant Value:

"tv_message_type"


### SESSION_DATA_KEY_VIDEO_UNAVAILABLE_REASON

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

```
public static final String SESSION_DATA_KEY_VIDEO_UNAVAILABLE_REASON
```

The reason why the video became unavailable.

The value can be `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_BUFFERING`,
`https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_AUDIO_ONLY`, etc.

Type: Integer

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`

Constant Value:

"video_unavailable_reason"


### SESSION_DATA_TYPE_AD_BUFFER_CONSUMED

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

```
public static final String SESSION_DATA_TYPE_AD_BUFFER_CONSUMED
```

Notifies the advertisement buffer is consumed.

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`
- `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_AD_BUFFER`

Constant Value:

"ad_buffer_consumed"


### SESSION_DATA_TYPE_AD_RESPONSE

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

```
public static final String SESSION_DATA_TYPE_AD_RESPONSE
```

Notifies response for advertisement.

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`
- `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_AD_RESPONSE`

Constant Value:

"ad_response"


### SESSION_DATA_TYPE_BROADCAST_INFO_RESPONSE

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

```
public static final String SESSION_DATA_TYPE_BROADCAST_INFO_RESPONSE
```

Notifies response for broadcast info.

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`
- `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_BROADCAST_INFO_RESPONSE`

Constant Value:

"broadcast_info_response"


### SESSION_DATA_TYPE_TRACKS_CHANGED

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

```
public static final String SESSION_DATA_TYPE_TRACKS_CHANGED
```

Sends the list of all audio/video/subtitle tracks.

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`
- `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_TRACKS`

Constant Value:

"tracks_changed"


### SESSION_DATA_TYPE_TRACK_SELECTED

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

```
public static final String SESSION_DATA_TYPE_TRACK_SELECTED
```

Sends the type and ID of a selected track. This is used to inform the application that a
specific track is selected.

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`
- `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_TRACK_TYPE`
- `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_TRACK_ID`

Constant Value:

"track_selected"


### SESSION_DATA_TYPE_TUNED

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

```
public static final String SESSION_DATA_TYPE_TUNED
```

Informs the application that the session has been tuned to the given channel.

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`
- `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_CHANNEL_URI`

Constant Value:

"tuned"


### SESSION_DATA_TYPE_TV_MESSAGE

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

```
public static final String SESSION_DATA_TYPE_TV_MESSAGE
```

Sends the TV message.

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`
- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTvMessage(int,%20android.os.Bundle)`
- `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_TV_MESSAGE_TYPE`

Constant Value:

"tv_message"


### SESSION_DATA_TYPE_VIDEO_AVAILABLE

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

```
public static final String SESSION_DATA_TYPE_VIDEO_AVAILABLE
```

Informs the application that the video is now available for watching.

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`

Constant Value:

"video_available"


### SESSION_DATA_TYPE_VIDEO_UNAVAILABLE

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

```
public static final String SESSION_DATA_TYPE_VIDEO_UNAVAILABLE
```

Informs the application that the video became unavailable for some reason.

<br />

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)`
- `https://developer.android.com/reference/android/media/tv/TvInputManager#SESSION_DATA_KEY_VIDEO_UNAVAILABLE_REASON`

Constant Value:

"video_unavailable"


### SIGNAL_STRENGTH_LOST

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

```
public static final int SIGNAL_STRENGTH_LOST
```

Signal lost.

<br />

Constant Value:

1
(0x00000001)


### SIGNAL_STRENGTH_STRONG

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

```
public static final int SIGNAL_STRENGTH_STRONG
```

Strong signal.

<br />

Constant Value:

3
(0x00000003)


### SIGNAL_STRENGTH_WEAK

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

```
public static final int SIGNAL_STRENGTH_WEAK
```

Weak signal.

<br />

Constant Value:

2
(0x00000002)


### TIME_SHIFT_INVALID_TIME

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

```
public static final long TIME_SHIFT_INVALID_TIME
```

Value returned by `https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTimeShiftGetCurrentPosition()` and
`https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTimeShiftGetStartPosition()` when time shifting has not
yet started.

<br />

Constant Value:

-9223372036854775808
(0x8000000000000000)


### TIME_SHIFT_MODE_AUTO

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

```
public static final int TIME_SHIFT_MODE_AUTO
```

Time shift mode: auto.

Time shift mode is handled automatically.

<br />

Constant Value:

4
(0x00000004)


### TIME_SHIFT_MODE_LOCAL

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

```
public static final int TIME_SHIFT_MODE_LOCAL
```

Time shift mode: local.

Time shift is handle locally, using on-device data. E.g. playing a local file.

<br />

Constant Value:

2
(0x00000002)


### TIME_SHIFT_MODE_NETWORK

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

```
public static final int TIME_SHIFT_MODE_NETWORK
```

Time shift mode: network.

Time shift is handle remotely via network. E.g. online streaming.

<br />

Constant Value:

3
(0x00000003)


### TIME_SHIFT_MODE_OFF

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

```
public static final int TIME_SHIFT_MODE_OFF
```

Time shift mode: off.

Time shift is disabled.

<br />

Constant Value:

1
(0x00000001)


### TIME_SHIFT_STATUS_AVAILABLE

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

```
public static final int TIME_SHIFT_STATUS_AVAILABLE
```

Status for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTimeShiftStatusChanged(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onTimeShiftStatusChanged(java.lang.String,%20int)`: Time shifting is
currently available. In this status, the application assumes it can pause/resume playback,
seek to a specified time position and set playback rate and audio mode.

<br />

Constant Value:

3
(0x00000003)


### TIME_SHIFT_STATUS_UNAVAILABLE

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

```
public static final int TIME_SHIFT_STATUS_UNAVAILABLE
```

Status for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTimeShiftStatusChanged(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onTimeShiftStatusChanged(java.lang.String,%20int)`: Time shifting is
currently unavailable but might work again later.

<br />

Constant Value:

2
(0x00000002)


### TIME_SHIFT_STATUS_UNKNOWN

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

```
public static final int TIME_SHIFT_STATUS_UNKNOWN
```

Status for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTimeShiftStatusChanged(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onTimeShiftStatusChanged(java.lang.String,%20int)`: Unknown status. Also
the status prior to calling `notifyTimeShiftStatusChanged`.

<br />

Constant Value:

0
(0x00000000)


### TIME_SHIFT_STATUS_UNSUPPORTED

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

```
public static final int TIME_SHIFT_STATUS_UNSUPPORTED
```

Status for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTimeShiftStatusChanged(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onTimeShiftStatusChanged(java.lang.String,%20int)`: The current TV input
does not support time shifting.

<br />

Constant Value:

1
(0x00000001)


### TV_MESSAGE_GROUP_ID_NONE

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

```
public static final long TV_MESSAGE_GROUP_ID_NONE
```

This value for `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_KEY_GROUP_ID` denotes that the message doesn't
belong to any group.

<br />

Constant Value:

-1
(0xffffffffffffffff)


### TV_MESSAGE_KEY_GROUP_ID

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

```
public static final String TV_MESSAGE_KEY_GROUP_ID
```

This constant is used as a `https://developer.android.com/reference/android/os/Bundle` key for TV messages. This is used to
optionally identify messages that belong together, such as headers and bodies
of the same event. For messages that do not have a group, this value
should be `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_GROUP_ID_NONE`.

As -1 is a reserved value, -1 should not be used as a valid groupId.

Type: long

<br />

Constant Value:

"android.media.tv.TvInputManager.group_id"


### TV_MESSAGE_KEY_RAW_DATA

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

```
public static final String TV_MESSAGE_KEY_RAW_DATA
```

This constant is used as a `https://developer.android.com/reference/android/os/Bundle` key for TV messages. The value of the key
stores the raw data contained in this TV message. The format of this data is determined
by the format defined by the subtype, found using the key at
`https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_KEY_SUBTYPE`. See `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_KEY_SUBTYPE` for more
information on how to parse this data.

Type: byte\[\]

<br />

Constant Value:

"android.media.tv.TvInputManager.raw_data"


### TV_MESSAGE_KEY_STREAM_ID

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

```
public static final String TV_MESSAGE_KEY_STREAM_ID
```

This constant is used as a `https://developer.android.com/reference/android/os/Bundle` key for TV messages. The value of the key
identifies the stream on the TV input source for which the watermark event is relevant to.

Type: String

<br />

Constant Value:

"android.media.tv.TvInputManager.stream_id"


### TV_MESSAGE_KEY_SUBTYPE

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

```
public static final String TV_MESSAGE_KEY_SUBTYPE
```

This constant is used as a `https://developer.android.com/reference/android/os/Bundle` key for TV messages. The value of the key
identifies the subtype of the data, such as the format of the CC data. The format
found at this key can then be used to identify how to parse the data at
`https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_KEY_RAW_DATA`.

To parse the raw data based on the subtype, please refer to the official
documentation of the concerning subtype. For example, for the subtype
`https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_SUBTYPE_WATERMARKING_A335`, the document for A/335 from the ATSC
standard details how this data is formatted. Similarly, the subtype
`https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_SUBTYPE_CC_608E` is documented in the ANSI/CTA standard for
608-E. These subtypes are examples of common formats for their respective uses
and other subtypes may exist.

Type: String

<br />

Constant Value:

"android.media.tv.TvInputManager.subtype"


### TV_MESSAGE_SUBTYPE_CC_608E

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

```
public static final String TV_MESSAGE_SUBTYPE_CC_608E
```

This is a subtype for TV messages that can be potentially found as a value
at `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_KEY_SUBTYPE`. It identifies the subtype of the message
as the CC format CTA 608-E.

<br />

Constant Value:

"CTA 608-E"


### TV_MESSAGE_SUBTYPE_WATERMARKING_A335

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

```
public static final String TV_MESSAGE_SUBTYPE_WATERMARKING_A335
```

This is a subtype for TV messages that can be potentially found as a value
at `https://developer.android.com/reference/android/media/tv/TvInputManager#TV_MESSAGE_KEY_SUBTYPE`. It identifies the subtype of the message
as the watermarking format ATSC A/335.

<br />

Constant Value:

"ATSC A/335"


### TV_MESSAGE_TYPE_CLOSED_CAPTION

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

```
public static final int TV_MESSAGE_TYPE_CLOSED_CAPTION
```

Indicates that this TV message contains Closed Captioning data

<br />

Constant Value:

2
(0x00000002)


### TV_MESSAGE_TYPE_OTHER

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

```
public static final int TV_MESSAGE_TYPE_OTHER
```

Indicates that this TV message contains other data

<br />

Constant Value:

1000
(0x000003e8)


### TV_MESSAGE_TYPE_WATERMARK

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

```
public static final int TV_MESSAGE_TYPE_WATERMARK
```

Indicates that this TV message contains watermarking data

<br />

Constant Value:

1
(0x00000001)


### VIDEO_UNAVAILABLE_REASON_AUDIO_ONLY

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

```
public static final int VIDEO_UNAVAILABLE_REASON_AUDIO_ONLY
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
the current TV program is audio-only.

<br />

Constant Value:

4
(0x00000004)


### VIDEO_UNAVAILABLE_REASON_BUFFERING

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

```
public static final int VIDEO_UNAVAILABLE_REASON_BUFFERING
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
the corresponding TV input has stopped playback temporarily to buffer more data.

<br />

Constant Value:

3
(0x00000003)


### VIDEO_UNAVAILABLE_REASON_CAS_BLACKOUT

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

```
public static final int VIDEO_UNAVAILABLE_REASON_CAS_BLACKOUT
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
of a geographical blackout.

<br />

Constant Value:

16
(0x00000010)


### VIDEO_UNAVAILABLE_REASON_CAS_CARD_INVALID

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

```
public static final int VIDEO_UNAVAILABLE_REASON_CAS_CARD_INVALID
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
smart card is invalid.

<br />

Constant Value:

15
(0x0000000f)


### VIDEO_UNAVAILABLE_REASON_CAS_CARD_MUTE

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

```
public static final int VIDEO_UNAVAILABLE_REASON_CAS_CARD_MUTE
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
smart card is muted.

<br />

Constant Value:

14
(0x0000000e)


### VIDEO_UNAVAILABLE_REASON_CAS_INSUFFICIENT_OUTPUT_PROTECTION

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

```
public static final int VIDEO_UNAVAILABLE_REASON_CAS_INSUFFICIENT_OUTPUT_PROTECTION
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
the output protection level enabled on the device is not sufficient to meet the requirements
in the license policy.

<br />

Constant Value:

7
(0x00000007)


### VIDEO_UNAVAILABLE_REASON_CAS_LICENSE_EXPIRED

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

```
public static final int VIDEO_UNAVAILABLE_REASON_CAS_LICENSE_EXPIRED
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
Using a license in whhich the keys have expired.

<br />

Constant Value:

10
(0x0000000a)


### VIDEO_UNAVAILABLE_REASON_CAS_NEED_ACTIVATION

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

```
public static final int VIDEO_UNAVAILABLE_REASON_CAS_NEED_ACTIVATION
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
the device need be activated.

<br />

Constant Value:

11
(0x0000000b)


### VIDEO_UNAVAILABLE_REASON_CAS_NEED_PAIRING

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

```
public static final int VIDEO_UNAVAILABLE_REASON_CAS_NEED_PAIRING
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
the device need be paired.

<br />

Constant Value:

12
(0x0000000c)


### VIDEO_UNAVAILABLE_REASON_CAS_NO_CARD

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

```
public static final int VIDEO_UNAVAILABLE_REASON_CAS_NO_CARD
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
smart card is missed.

<br />

Constant Value:

13
(0x0000000d)


### VIDEO_UNAVAILABLE_REASON_CAS_PVR_RECORDING_NOT_ALLOWED

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

```
public static final int VIDEO_UNAVAILABLE_REASON_CAS_PVR_RECORDING_NOT_ALLOWED
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
the PVR record is not allowed by the license policy.

<br />

Constant Value:

8
(0x00000008)


### VIDEO_UNAVAILABLE_REASON_CAS_REBOOTING

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

```
public static final int VIDEO_UNAVAILABLE_REASON_CAS_REBOOTING
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
CAS system is rebooting.

<br />

Constant Value:

17
(0x00000011)


### VIDEO_UNAVAILABLE_REASON_CAS_UNKNOWN

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

```
public static final int VIDEO_UNAVAILABLE_REASON_CAS_UNKNOWN
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
of unknown CAS error.

<br />

Constant Value:

18
(0x00000012)


### VIDEO_UNAVAILABLE_REASON_INSUFFICIENT_RESOURCE

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

```
public static final int VIDEO_UNAVAILABLE_REASON_INSUFFICIENT_RESOURCE
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
the resource is not enough to meet requirement.

<br />

Constant Value:

6
(0x00000006)


### VIDEO_UNAVAILABLE_REASON_NOT_CONNECTED

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

```
public static final int VIDEO_UNAVAILABLE_REASON_NOT_CONNECTED
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
the source is not physically connected, for example the HDMI cable is not connected.

<br />

Constant Value:

5
(0x00000005)


### VIDEO_UNAVAILABLE_REASON_STOPPED

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

```
public static final int VIDEO_UNAVAILABLE_REASON_STOPPED
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
it has been stopped by `https://developer.android.com/reference/android/media/tv/TvView#stopPlayback(int)`.

<br />

Constant Value:

19
(0x00000013)


### VIDEO_UNAVAILABLE_REASON_TUNING

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

```
public static final int VIDEO_UNAVAILABLE_REASON_TUNING
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable because
the corresponding TV input is in the middle of tuning to a new channel.

<br />

Constant Value:

1
(0x00000001)


### VIDEO_UNAVAILABLE_REASON_UNKNOWN

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

```
public static final int VIDEO_UNAVAILABLE_REASON_UNKNOWN
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable due to
an unspecified error.

<br />

Constant Value:

0
(0x00000000)


### VIDEO_UNAVAILABLE_REASON_WEAK_SIGNAL

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

```
public static final int VIDEO_UNAVAILABLE_REASON_WEAK_SIGNAL
```

Reason for `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)` and
`https://developer.android.com/reference/android/media/tv/TvView.TvInputCallback#onVideoUnavailable(java.lang.String,%20int)`: Video is unavailable due to
weak TV signal.

<br />

Constant Value:

2
(0x00000002)


## Public methods

### getBlockedRatings

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

```
public List<TvContentRating> getBlockedRatings ()
```

Returns the list of blocked content ratings.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/media/tv/TvContentRating>` | the list of content ratings blocked by the user. <br /> |

### getInputState

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

```
public int getInputState (String inputId)
```

Returns the state of a given TV input.

The state 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`

<br />

<br />

| Parameters ||
|---|---|
| `inputId` | `String`: The ID of the TV input. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `int` | 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` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the argument is `null`. |

### getTvInputInfo

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

```
public TvInputInfo getTvInputInfo (String inputId)
```

Returns the `https://developer.android.com/reference/android/media/tv/TvInputInfo` for a given TV input.

<br />

| Parameters ||
|---|---|
| `inputId` | `String`: The ID of the TV input. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/media/tv/TvInputInfo` | the `https://developer.android.com/reference/android/media/tv/TvInputInfo` for a given TV input. `null` if not found. <br /> |

### getTvInputList

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

```
public List<TvInputInfo> getTvInputList ()
```

Returns the complete list of TV inputs on the system.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/media/tv/TvInputInfo>` | List of `https://developer.android.com/reference/android/media/tv/TvInputInfo` for each TV input that describes its meta information. <br /> |

### isParentalControlsEnabled

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

```
public boolean isParentalControlsEnabled ()
```

Returns the user's parental controls enabled state.

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the user enabled the parental controls, `false` otherwise. <br /> |

### isRatingBlocked

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

```
public boolean isRatingBlocked (TvContentRating rating)
```

Checks whether a given TV content rating is blocked by the user.

<br />

| Parameters ||
|---|---|
| `rating` | `TvContentRating`: The TV content rating to check. Can be `https://developer.android.com/reference/android/media/tv/TvContentRating#UNRATED`. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the given TV content rating is blocked, `false` otherwise. <br /> |

### registerCallback

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

```
public void registerCallback (TvInputManager.TvInputCallback callback, 
                Handler handler)
```

Registers a `https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback`.

<br />

| Parameters ||
|---|---|
| `callback` | `TvInputManager.TvInputCallback`: A callback used to monitor status of the TV inputs. This value cannot be `null`. <br /> |
| `handler` | `Handler`: A `https://developer.android.com/reference/android/os/Handler` that the status change will be delivered to. This value cannot be `null`. <br /> |

### unregisterCallback

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

```
public void unregisterCallback (TvInputManager.TvInputCallback callback)
```

Unregisters the existing `https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback`.

<br />

| Parameters ||
|---|---|
| `callback` | `TvInputManager.TvInputCallback`: The existing callback to remove. This value cannot be `null`. <br /> |

### updateTvInputInfo

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

```
public void updateTvInputInfo (TvInputInfo inputInfo)
```

Updates the `TvInputInfo` for an existing TV input. A TV input service
implementation may call this method to pass the application and system an up-to-date
`TvInputInfo` object that describes itself.

The system automatically creates a `TvInputInfo` object for each TV input,
based on the information collected from the `AndroidManifest.xml`, thus it is not
necessary to call this method unless such information has changed dynamically.
Use `https://developer.android.com/reference/android/media/tv/TvInputInfo.Builder` to build a new `TvInputInfo` object.

Attempting to change information about a TV input that the calling package does not own
does nothing.

<br />

| Parameters ||
|---|---|
| `inputInfo` | `TvInputInfo`: The `TvInputInfo` object that contains new information. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the argument is `null`. |

**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputManager.TvInputCallback#onTvInputInfoUpdated(android.media.tv.TvInputInfo)`