Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

TvInputManager.TvInputCallback

public static abstract class TvInputManager.TvInputCallback
extends Object

java.lang.Object
   ↳ android.media.tv.TvInputManager.TvInputCallback


Callback used to monitor status of the TV inputs.

Summary

Public constructors

TvInputManager.TvInputCallback()

Public methods

void onInputAdded(String inputId)

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

void onInputRemoved(String inputId)

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

void onInputStateChanged(String inputId, int state)

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

void onInputUpdated(String inputId)

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

void onTvInputInfoUpdated(TvInputInfo inputInfo)

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

Inherited methods

Public constructors

TvInputManager.TvInputCallback

added in API level 21
public TvInputManager.TvInputCallback ()

Public methods

onInputAdded

added in API level 21
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 TvInputService interface.

Parameters
inputId String: The ID of the TV input.

onInputRemoved

added in API level 21
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.

Parameters
inputId String: The ID of the TV input.

onInputStateChanged

added in API level 21
public void onInputStateChanged (String inputId, 
                int state)

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:

onInputUpdated

added in API level 24
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.

Parameters
inputId String: The ID of the TV input.

onTvInputInfoUpdated

added in API level 24
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.

Parameters
inputInfo TvInputInfo: The TvInputInfo object that contains new information.