TvInputManager
class TvInputManager
| kotlin.Any | |
| ↳ | android.media.tv.TvInputManager |
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
TvInputServicerepresents 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’s 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
TvVieworTvRecordingClientfor further interaction such as watching and recording broadcast TV programs.
Summary
| Nested classes | |
|---|---|
| abstract |
Callback used to monitor status of the TV inputs. |
| Constants | |
|---|---|
| static String |
Broadcast intent action when the user blocked content ratings change. |
| static String |
Broadcast intent action when the parental controls enabled state changes. |
| static String |
Broadcast intent action used to query available content rating systems. |
| static String |
Activity action to set up channel sources i. |
| static String |
Activity action to display the recording schedules. |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int | |
| static Int |
State for |
| static Int |
State for |
| static Int |
State for |
| static String |
Content rating systems metadata associated with |
| static Int |
Error for |
| static Int |
Error for |
| static Int |
Error for |
| static String |
An object of |
| static String |
An object of |
| static String |
An object of |
| static String |
The URI of a channel. |
| static String |
A list which includes track information. |
| static String |
The ID of the track. |
| static String |
The type of the track. |
| static String |
The type of TV message. |
| static String |
The reason why the video became unavailable. |
| static String |
Notifies the advertisement buffer is consumed. |
| static String |
Notifies response for advertisement. |
| static String |
Notifies response for broadcast info. |
| static String |
Sends the list of all audio/video/subtitle tracks. |
| static String |
Sends the type and ID of a selected track. |
| static String |
Informs the application that the session has been tuned to the given channel. |
| static String |
Sends the TV message. |
| static String |
Informs the application that the video is now available for watching. |
| static String |
Informs the application that the video became unavailable for some reason. |
| static Int |
Signal lost. |
| static Int |
Strong signal. |
| static Int |
Weak signal. |
| static Long |
Value returned by |
| static Int |
Time shift mode: auto. |
| static Int |
Time shift mode: local. |
| static Int |
Time shift mode: network. |
| static Int |
Time shift mode: off. |
| static Int |
Status for |
| static Int |
Status for |
| static Int |
Status for |
| static Int |
Status for |
| static Long |
This value for |
| static String |
This constant is used as a |
| static String |
This constant is used as a |
| static String |
This constant is used as a |
| static String |
This constant is used as a |
| static String |
This is a subtype for TV messages that can be potentially found as a value at |
| static String |
This is a subtype for TV messages that can be potentially found as a value at |
| static Int |
Indicates that this TV message contains Closed Captioning data |
| static Int |
Indicates that this TV message contains other data |
| static Int |
Indicates that this TV message contains watermarking data |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| static Int |
Reason for |
| Public methods | |
|---|---|
| MutableList<TvContentRating!>! |
Returns the list of blocked content ratings. |
| Int |
getInputState(inputId: String)Returns the state of a given TV input. |
| TvInputInfo? |
getTvInputInfo(inputId: String)Returns the |
| MutableList<TvInputInfo!>! |
Returns the complete list of TV inputs on the system. |
| Boolean |
Returns the user's parental controls enabled state. |
| Boolean |
isRatingBlocked(rating: TvContentRating)Checks whether a given TV content rating is blocked by the user. |
| Unit |
registerCallback(callback: TvInputManager.TvInputCallback, handler: Handler)Registers a |
| Unit |
unregisterCallback(callback: TvInputManager.TvInputCallback)Unregisters the existing |
| Unit |
updateTvInputInfo(inputInfo: TvInputInfo)Updates the |
Constants
ACTION_BLOCKED_RATINGS_CHANGED
static val ACTION_BLOCKED_RATINGS_CHANGED: String
Broadcast intent action when the user blocked content ratings change. For use with the isRatingBlocked.
Value: "android.media.tv.action.BLOCKED_RATINGS_CHANGED"ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED
static val ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED: String
Broadcast intent action when the parental controls enabled state changes. For use with the isParentalControlsEnabled.
Value: "android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED"ACTION_QUERY_CONTENT_RATING_SYSTEMS
static val ACTION_QUERY_CONTENT_RATING_SYSTEMS: String
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.
<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.
Value: "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS"See Also
ACTION_SETUP_INPUTS
static val ACTION_SETUP_INPUTS: String
Activity action to set up channel sources i.e. TV inputs of type TvInputInfo.TYPE_TUNER. When invoked, the system will display an appropriate UI for the user to initiate the individual setup flow provided by android.R.attr#setupActivity of each TV input service.
Value: "android.media.tv.action.SETUP_INPUTS"ACTION_VIEW_RECORDING_SCHEDULES
static val ACTION_VIEW_RECORDING_SCHEDULES: String
Activity action to display the recording schedules. When invoked, the system will display an appropriate UI to browse the schedules.
Value: "android.media.tv.action.VIEW_RECORDING_SCHEDULES"