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 |
registerCallback(executor: Executor, callback: TvInteractiveAppManager.TvInteractiveAppCallback)Registers a |
| 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 |
Constants
ACTION_APP_LINK_COMMAND
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"See Also
APP_LINK_KEY_BACK_URI
static val APP_LINK_KEY_BACK_URI: String
Key for back URI in app link command.
Type: String
Value: "back_uri"See Also
APP_LINK_KEY_CLASS_NAME
static val APP_LINK_KEY_CLASS_NAME: String
Key for class name in app link.
Type: String
Value: "class_name"See Also
APP_LINK_KEY_COMMAND_TYPE
static val APP_LINK_KEY_COMMAND_TYPE: String
Key for command type in app link command.
Type: String
Value: "command_type"See Also
APP_LINK_KEY_PACKAGE_NAME
static val APP_LINK_KEY_PACKAGE_NAME: String
Key for package name in app link.
Type: String
Value: "package_name"See Also
APP_LINK_KEY_SERVICE_ID
static val APP_LINK_KEY_SERVICE_ID: String
Key for service ID in app link command.
Type: String
Value: "service_id"See Also
ERROR_BLOCKED
static val ERROR_BLOCKED: Int
Error code for blocked contents.
Value: 5ERROR_ENCRYPTED
static val ERROR_ENCRYPTED: Int
Error code when the key or module is missing for the encrypted channel.
Value: 6ERROR_NOT_SUPPORTED
static val ERROR_NOT_SUPPORTED: Int
Error code for an unsupported channel.
Value: 2ERROR_RESOURCE_UNAVAILABLE
static val ERROR_RESOURCE_UNAVAILABLE: Int
Error code when resource (e.g. tuner) is unavailable.
Value: 4ERROR_UNKNOWN_CHANNEL
static val ERROR_UNKNOWN_CHANNEL: Int
Error code when the current channel is an unknown channel.
Value: 7ERROR_WEAK_SIGNAL
static val ERROR_WEAK_SIGNAL: Int
Error code for weak signal.
Value: 3INTENT_KEY_BI_INTERACTIVE_APP_TYPE
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
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
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
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
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
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
static val INTERACTIVE_APP_STATE_ERROR: Int
Error state of interactive application.
Value: 3INTERACTIVE_APP_STATE_RUNNING
static val INTERACTIVE_APP_STATE_RUNNING: Int
Running state of interactive application.
Value: 2INTERACTIVE_APP_STATE_STOPPED
static val INTERACTIVE_APP_STATE_STOPPED: Int
Stopped (or not started) state of interactive application.
Value: 1SERVICE_STATE_ERROR
static val SERVICE_STATE_ERROR: Int
Error state of interactive app service.
Value: 4SERVICE_STATE_PREPARING
static val SERVICE_STATE_PREPARING: Int
Preparing state of interactive app service.
Value: 2SERVICE_STATE_READY
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: 3SERVICE_STATE_UNREALIZED
static val SERVICE_STATE_UNREALIZED: Int
Unrealized state of interactive app service.
Value: 1TELETEXT_APP_STATE_ERROR
static val TELETEXT_APP_STATE_ERROR: Int
State of Teletext app: error
Value: 3TELETEXT_APP_STATE_HIDE
static val TELETEXT_APP_STATE_HIDE: Int
State of Teletext app: hide
Value: 2TELETEXT_APP_STATE_SHOW
static val TELETEXT_APP_STATE_SHOW: Int
State of Teletext app: show
Value: 1Public methods
getAppLinkInfoList
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
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
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
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
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
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
fun unregisterCallback(callback: TvInteractiveAppManager.TvInteractiveAppCallback): Unit
Unregisters the existing TvInteractiveAppCallback.
| Parameters | |
|---|---|
callback |
TvInteractiveAppManager.TvInteractiveAppCallback: The existing callback to remove. This value cannot be null. |