Added in API level 33

TvInteractiveAppManager

class TvInteractiveAppManager
kotlin.Any
   ↳ android.media.tv.interactive.TvInteractiveAppManager

Central system API to the overall TV interactive application framework (TIAF) architecture, which arbitrates interaction between Android applications and TV interactive apps.

Summary

Nested classes
abstract

Callback used to monitor status of the TV Interactive App.

Constants
static String

Broadcast intent action to send app command to TV app.

static String

Key for back URI in app link command.

static String

Key for class name in app link.

static String

Key for command type in app link command.

static String

Key for package name in app link.

static String

Key for service ID in app link command.

static Int

Error code for blocked contents.

static Int

Error code when the key or module is missing for the encrypted channel.

static Int

No error.

static Int

Error code for an unsupported channel.

static Int

Error code when resource (e.g. tuner) is unavailable.

static Int

Unknown error code.

static Int

Error code when the current channel is an unknown channel.

static Int

Error code for weak signal.

static String

Intent key for broadcast-independent(BI) interactive app type.

static String

Intent key for broadcast-independent(BI) interactive app URI.

static String

Intent key for TV channel URI.

static String

Intent key for command type.

static String

Intent key for TV interactive app ID.

static String

Intent key for TV input ID.

static Int

Error state of interactive application.

static Int

Running state of interactive application.

static Int

Stopped (or not started) state of interactive application.

static Int

Error state of interactive app service.

static Int

Preparing state of interactive app service.

static Int

Ready state of interactive app service.

static Int

Unrealized state of interactive app service.

static Int

State of Teletext app: error

static Int

State of Teletext app: hide

static Int

State of Teletext app: show

Public methods
MutableList<AppLinkInfo!>

Returns a list of available app link information.

MutableList<TvInteractiveAppServiceInfo!>

Returns the complete list of TV Interactive App service on the system.

Unit
registerAppLinkInfo(tvIAppServiceId: String, appLinkInfo: AppLinkInfo)

Registers an Android application link info record which can be used to launch the specific Android application by TV interactive App RTE.

Unit

Registers a TvInteractiveAppCallback.

Unit
sendAppLinkCommand(tvIAppServiceId: String, command: Bundle)

Sends app link command.

Unit
unregisterAppLinkInfo(tvIAppServiceId: String, appLinkInfo: AppLinkInfo)

Unregisters an Android application link info record which can be used to launch the specific Android application by TV interactive App RTE.

Unit

Unregisters the existing TvInteractiveAppCallback.

Constants

Added in API level 33
static val ACTION_APP_LINK_COMMAND: String

Broadcast intent action to send app command to TV app.

Value: "android.media.tv.interactive.action.APP_LINK_COMMAND"
Added in API level 33
static val APP_LINK_KEY_BACK_URI: String

Key for back URI in app link command.

Type: String

Value: "back_uri"
Added in API level 33
static val APP_LINK_KEY_CLASS_NAME: String

Key for class name in app link.

Type: String

Value: "class_name"
Added in API level 33
static val APP_LINK_KEY_COMMAND_TYPE: String

Key for command type in app link command.

Type: String

Value: "command_type"
Added in API level 33
static val APP_LINK_KEY_PACKAGE_NAME: String

Key for package name in app link.

Type: String

Value: "package_name"
Added in API level 33
static val APP_LINK_KEY_SERVICE_ID: String

Key for service ID in app link command.

Type: String

Value: "service_id"

ERROR_BLOCKED

Added in API level 33
static val ERROR_BLOCKED: Int

Error code for blocked contents.

Value: 5

ERROR_ENCRYPTED

Added in API level 33
static val ERROR_ENCRYPTED: Int

Error code when the key or module is missing for the encrypted channel.

Value: 6

ERROR_NONE

Added in API level 33
static val ERROR_NONE: Int

No error.

Value: 0

ERROR_NOT_SUPPORTED

Added in API level 33
static val ERROR_NOT_SUPPORTED: Int

Error code for an unsupported channel.

Value: 2

ERROR_RESOURCE_UNAVAILABLE

Added in API level 33
static val ERROR_RESOURCE_UNAVAILABLE: Int

Error code when resource (e.g. tuner) is unavailable.

Value: 4

ERROR_UNKNOWN

Added in API level 33
static val ERROR_UNKNOWN: Int

Unknown error code.

Value: 1

ERROR_UNKNOWN_CHANNEL

Added in API level 33
static val ERROR_UNKNOWN_CHANNEL: Int

Error code when the current channel is an unknown channel.

Value: 7

ERROR_WEAK_SIGNAL

Added in API level 33
static val ERROR_WEAK_SIGNAL: Int

Error code for weak signal.

Value: 3

INTENT_KEY_BI_INTERACTIVE_APP_TYPE

Added in API level 33
static val INTENT_KEY_BI_INTERACTIVE_APP_TYPE: String

Intent key for broadcast-independent(BI) interactive app type. It's used to send app command to TV app.

Type: int

Value: "bi_interactive_app_type"

INTENT_KEY_BI_INTERACTIVE_APP_URI

Added in API level 33
static val INTENT_KEY_BI_INTERACTIVE_APP_URI: String

Intent key for broadcast-independent(BI) interactive app URI. It's used to send app command to TV app.

Type: android.net.Uri

Value: "bi_interactive_app_uri"

INTENT_KEY_CHANNEL_URI

Added in API level 33
static val INTENT_KEY_CHANNEL_URI: String

Intent key for TV channel URI. It's used to send app command to TV app.

Type: android.net.Uri

Value: "channel_uri"

INTENT_KEY_COMMAND_TYPE

Added in API level 33
static val INTENT_KEY_COMMAND_TYPE: String

Intent key for command type. It's used to send app command to TV app. The value of this key could vary according to TV apps.

Type: String

Value: "command_type"

INTENT_KEY_INTERACTIVE_APP_SERVICE_ID

Added in API level 33
static val INTENT_KEY_INTERACTIVE_APP_SERVICE_ID: String

Intent key for TV interactive app ID. It's used to send app command to TV app.

Type: String

Value: "interactive_app_id"

INTENT_KEY_TV_INPUT_ID

Added in API level 33
static val INTENT_KEY_TV_INPUT_ID: String

Intent key for TV input ID. It's used to send app command to TV app.

Type: String

Value: "tv_input_id"

INTERACTIVE_APP_STATE_ERROR

Added in API level 33
static val INTERACTIVE_APP_STATE_ERROR: Int

Error state of interactive application.

Value: 3

INTERACTIVE_APP_STATE_RUNNING

Added in API level 33
static val INTERACTIVE_APP_STATE_RUNNING: Int

Running state of interactive application.

Value: 2

INTERACTIVE_APP_STATE_STOPPED

Added in API level 33
static val INTERACTIVE_APP_STATE_STOPPED: Int

Stopped (or not started) state of interactive application.

Value: 1

SERVICE_STATE_ERROR

Added in API level 33
static val SERVICE_STATE_ERROR: Int

Error state of interactive app service.

Value: 4

SERVICE_STATE_PREPARING

Added in API level 33
static val SERVICE_STATE_PREPARING: Int

Preparing state of interactive app service.

Value: 2

SERVICE_STATE_READY

Added in API level 33
static val SERVICE_STATE_READY: Int

Ready state of interactive app service.

In this state, the interactive app service is ready, and interactive apps can be started.

Value: 3

SERVICE_STATE_UNREALIZED

Added in API level 33
static val SERVICE_STATE_UNREALIZED: Int

Unrealized state of interactive app service.

Value: 1

TELETEXT_APP_STATE_ERROR

Added in API level 33
static val TELETEXT_APP_STATE_ERROR: Int

State of Teletext app: error

Value: 3

TELETEXT_APP_STATE_HIDE

Added in API level 33
static val TELETEXT_APP_STATE_HIDE: Int

State of Teletext app: hide

Value: 2

TELETEXT_APP_STATE_SHOW

Added in API level 33
static val TELETEXT_APP_STATE_SHOW: Int

State of Teletext app: show

Value: 1

Public methods

getAppLinkInfoList

Added in API level 34
fun getAppLinkInfoList(): MutableList<AppLinkInfo!>

Returns a list of available app link information.

A package must declare its app link info in its manifest using meta-data tag, so the info can be detected by the system.

Return
MutableList<AppLinkInfo!> List of AppLinkInfo for each package that deslares its app link information. This value cannot be null.

getTvInteractiveAppServiceList

Added in API level 33
fun getTvInteractiveAppServiceList(): MutableList<TvInteractiveAppServiceInfo!>

Returns the complete list of TV Interactive App service on the system.

Return
MutableList<TvInteractiveAppServiceInfo!> List of TvInteractiveAppServiceInfo for each TV Interactive App service that describes its meta information. This value cannot be null.

registerAppLinkInfo

Added in API level 33
fun registerAppLinkInfo(
    tvIAppServiceId: String,
    appLinkInfo: AppLinkInfo
): Unit

Registers an Android application link info record which can be used to launch the specific Android application by TV interactive App RTE.

Parameters
tvIAppServiceId String: The ID of TV interactive service which the command to be sent to. The ID can be found in TvInteractiveAppServiceInfo#getId(). This value cannot be null.
appLinkInfo AppLinkInfo: The Android application link info record to be registered. This value cannot be null.

registerCallback

Added in API level 33
fun registerCallback(
    executor: Executor,
    callback: TvInteractiveAppManager.TvInteractiveAppCallback
): Unit

Registers a TvInteractiveAppCallback.

Parameters
callback TvInteractiveAppManager.TvInteractiveAppCallback: A callback used to monitor status of the TV Interactive App services. This value cannot be null.
executor Executor: A Executor that the status change will be delivered to. Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread. This value cannot be null.

sendAppLinkCommand

Added in API level 33
fun sendAppLinkCommand(
    tvIAppServiceId: String,
    command: Bundle
): Unit

Sends app link command.

Parameters
tvIAppServiceId String: The ID of TV interactive service which the command to be sent to. The ID can be found in TvInteractiveAppServiceInfo#getId(). This value cannot be null.
command Bundle: The command to be sent. This value cannot be null.

unregisterAppLinkInfo

Added in API level 33
fun unregisterAppLinkInfo(
    tvIAppServiceId: String,
    appLinkInfo: AppLinkInfo
): Unit

Unregisters an Android application link info record which can be used to launch the specific Android application by TV interactive App RTE.

Parameters
tvIAppServiceId String: The ID of TV interactive service which the command to be sent to. The ID can be found in TvInteractiveAppServiceInfo#getId(). This value cannot be null.
appLinkInfo AppLinkInfo: The Android application link info record to be unregistered. This value cannot be null.

unregisterCallback

Added in API level 33
fun unregisterCallback(callback: TvInteractiveAppManager.TvInteractiveAppCallback): Unit

Unregisters the existing TvInteractiveAppCallback.

Parameters
callback TvInteractiveAppManager.TvInteractiveAppCallback: The existing callback to remove. This value cannot be null.