TvInputCallback
abstract class TvInputCallback
kotlin.Any | |
↳ | android.media.tv.TvInputManager.TvInputCallback |
Callback used to monitor status of the TV inputs.
Summary
Public constructors | |
---|---|
Public methods | |
---|---|
open Unit |
onInputAdded(inputId: String!) This is called when a TV input is added to the system. |
open Unit |
onInputRemoved(inputId: String!) This is called when a TV input is removed from the system. |
open Unit |
onInputStateChanged(inputId: String!, state: Int) This is called when the state of a given TV input is changed. |
open Unit |
onInputUpdated(inputId: String!) This is called when a TV input is updated on the system. |
open Unit |
onTvInputInfoUpdated(inputInfo: TvInputInfo!) This is called when the information about an existing TV input has been updated. |
Public constructors
TvInputCallback
TvInputCallback()
Public methods
onInputAdded
open fun onInputAdded(inputId: String!): Unit
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 TvInputService
interface.
Parameters | |
---|---|
inputId |
String!: The ID of the TV input. |
onInputRemoved
open fun onInputRemoved(inputId: String!): Unit
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.
Parameters | |
---|---|
inputId |
String!: The ID of the TV input. |
onInputStateChanged
open fun onInputStateChanged(
inputId: String!,
state: Int
): Unit
This is called when the state of a given TV input is changed.
Parameters | |
---|---|
inputId |
String!: The ID of the TV input. |
state |
Int: State of the TV input. The value is one of the following:
android.media.tv.TvInputManager#INPUT_STATE_CONNECTED , android.media.tv.TvInputManager#INPUT_STATE_CONNECTED_STANDBY , or android.media.tv.TvInputManager#INPUT_STATE_DISCONNECTED |
onInputUpdated
open fun onInputUpdated(inputId: String!): Unit
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.
Parameters | |
---|---|
inputId |
String!: The ID of the TV input. |
onTvInputInfoUpdated
open fun onTvInputInfoUpdated(inputInfo: TvInputInfo!): Unit
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.
Parameters | |
---|---|
inputInfo |
TvInputInfo!: The TvInputInfo object that contains new information. |