TvInteractiveAppService
public
abstract
class
TvInteractiveAppService
extends Service
java.lang.Object | ||||
↳ | android.content.Context | |||
↳ | android.content.ContextWrapper | |||
↳ | android.app.Service | |||
↳ | android.media.tv.interactive.TvInteractiveAppService |
A TV interactive application service is a service that provides runtime environment and runs TV interactive applications.
Summary
Nested classes | |
---|---|
class |
TvInteractiveAppService.Session
Base class for derived classes to implement to provide a TV interactive app session. |
Constants | |
---|---|
String |
COMMAND_PARAMETER_KEY_CHANGE_CHANNEL_QUIETLY
Command to quiet channel change. |
String |
COMMAND_PARAMETER_KEY_CHANNEL_URI
Playback command parameter: channel URI. |
String |
COMMAND_PARAMETER_KEY_INPUT_ID
Playback command parameter: TV input ID. |
String |
COMMAND_PARAMETER_KEY_PLAYBACK_PARAMS
Time shift command parameter: playback params. |
String |
COMMAND_PARAMETER_KEY_PROGRAM_URI
Time shift command parameter: program URI. |
String |
COMMAND_PARAMETER_KEY_STOP_MODE
Playback command parameter: stop mode. |
String |
COMMAND_PARAMETER_KEY_TIME_POSITION
Time shift command parameter: time position for time shifting, in milliseconds. |
String |
COMMAND_PARAMETER_KEY_TIME_SHIFT_MODE
Time shift command parameter: playback params. |
String |
COMMAND_PARAMETER_KEY_TRACK_ID
Playback command parameter: track ID. |
String |
COMMAND_PARAMETER_KEY_TRACK_TYPE
Playback command parameter: track type. |
String |
COMMAND_PARAMETER_KEY_VOLUME
Playback command parameter: stream volume. |
int |
COMMAND_PARAMETER_VALUE_STOP_MODE_BLANK
Playback command stop mode: show a blank screen. |
int |
COMMAND_PARAMETER_VALUE_STOP_MODE_FREEZE
Playback command stop mode: freeze the video. |
String |
PLAYBACK_COMMAND_TYPE_SELECT_TRACK
Playback command type: select the given track. |
String |
PLAYBACK_COMMAND_TYPE_SET_STREAM_VOLUME
Playback command type: set the volume. |
String |
PLAYBACK_COMMAND_TYPE_STOP
Playback command type: stop the playback. |
String |
PLAYBACK_COMMAND_TYPE_TUNE
Playback command type: tune to the given channel. |
String |
PLAYBACK_COMMAND_TYPE_TUNE_NEXT
Playback command type: tune to the next channel. |
String |
PLAYBACK_COMMAND_TYPE_TUNE_PREV
Playback command type: tune to the previous channel. |
String |
SERVICE_INTERFACE
This is the interface name that a service implementing a TV Interactive App service should say that it supports -- that is, this is the action it uses for its intent filter. |
String |
SERVICE_META_DATA
Name under which a TvInteractiveAppService component publishes information about itself. |
String |
TIME_SHIFT_COMMAND_TYPE_PAUSE
Time shift command type: pause. |
String |
TIME_SHIFT_COMMAND_TYPE_PLAY
Time shift command type: play. |
String |
TIME_SHIFT_COMMAND_TYPE_RESUME
Time shift command type: resume. |
String |
TIME_SHIFT_COMMAND_TYPE_SEEK_TO
Time shift command type: seek to. |
String |
TIME_SHIFT_COMMAND_TYPE_SET_MODE
Time shift command type: set time shift mode. |
String |
TIME_SHIFT_COMMAND_TYPE_SET_PLAYBACK_PARAMS
Time shift command type: set playback params. |
Inherited constants |
---|
Public constructors | |
---|---|
TvInteractiveAppService()
|
Public methods | |
---|---|
final
void
|
notifyStateChanged(int type, int state, int error)
Notifies the system when the state of the interactive app RTE has been changed. |
void
|
onAppLinkCommand(Bundle command)
Called when app link command is received. |
final
IBinder
|
onBind(Intent intent)
Return the communication channel to the service. |
abstract
TvInteractiveAppService.Session
|
onCreateSession(String iAppServiceId, int type)
Returns a concrete implementation of |
void
|
onRegisterAppLinkInfo(AppLinkInfo appLinkInfo)
Called when a request to register an Android application link info record is received. |
void
|
onUnregisterAppLinkInfo(AppLinkInfo appLinkInfo)
Called when a request to unregister an Android application link info record is received. |
Inherited methods | |
---|---|
Constants
COMMAND_PARAMETER_KEY_CHANGE_CHANNEL_QUIETLY
public static final String COMMAND_PARAMETER_KEY_CHANGE_CHANNEL_QUIETLY
Command to quiet channel change. No channel banner or channel info is shown.
Refer to HbbTV Spec 2.0.4 chapter A.2.4.3.
Constant Value: "command_change_channel_quietly"
COMMAND_PARAMETER_KEY_CHANNEL_URI
public static final String COMMAND_PARAMETER_KEY_CHANNEL_URI
Playback command parameter: channel URI.
Type: android.net.Uri
See also:
Constant Value: "command_channel_uri"
COMMAND_PARAMETER_KEY_INPUT_ID
public static final String COMMAND_PARAMETER_KEY_INPUT_ID
Playback command parameter: TV input ID.
Type: String
See also:
Constant Value: "command_input_id"
COMMAND_PARAMETER_KEY_PLAYBACK_PARAMS
public static final String COMMAND_PARAMETER_KEY_PLAYBACK_PARAMS
Time shift command parameter: playback params.
Type: android.media.PlaybackParams
Constant Value: "command_playback_params"
COMMAND_PARAMETER_KEY_PROGRAM_URI
public static final String COMMAND_PARAMETER_KEY_PROGRAM_URI
Time shift command parameter: program URI.
Type: android.net.Uri
See also:
Constant Value: "command_program_uri"
COMMAND_PARAMETER_KEY_STOP_MODE
public static final String COMMAND_PARAMETER_KEY_STOP_MODE
Playback command parameter: stop mode.
Type: int
See also:
Constant Value: "command_stop_mode"
COMMAND_PARAMETER_KEY_TIME_POSITION
public static final String COMMAND_PARAMETER_KEY_TIME_POSITION
Time shift command parameter: time position for time shifting, in milliseconds.
Type: long
See also:
Constant Value: "command_time_position"
COMMAND_PARAMETER_KEY_TIME_SHIFT_MODE
public static final String COMMAND_PARAMETER_KEY_TIME_SHIFT_MODE
Time shift command parameter: playback params.
Type: Integer. One of TvInputManager.TIME_SHIFT_MODE_OFF
,
TvInputManager.TIME_SHIFT_MODE_LOCAL
,
TvInputManager.TIME_SHIFT_MODE_NETWORK
,
TvInputManager.TIME_SHIFT_MODE_AUTO
.
See also:
Constant Value: "command_time_shift_mode"
COMMAND_PARAMETER_KEY_TRACK_ID
public static final String COMMAND_PARAMETER_KEY_TRACK_ID
Playback command parameter: track ID.
Type: String
Constant Value: "command_track_id"
COMMAND_PARAMETER_KEY_TRACK_TYPE
public static final String COMMAND_PARAMETER_KEY_TRACK_TYPE
Playback command parameter: track type.
Type: int
Constant Value: "command_track_type"
COMMAND_PARAMETER_KEY_VOLUME
public static final String COMMAND_PARAMETER_KEY_VOLUME
Playback command parameter: stream volume.
Type: float
See also:
Constant Value: "command_volume"
COMMAND_PARAMETER_VALUE_STOP_MODE_BLANK
public static final int COMMAND_PARAMETER_VALUE_STOP_MODE_BLANK
Playback command stop mode: show a blank screen.
See also:
Constant Value: 1 (0x00000001)
COMMAND_PARAMETER_VALUE_STOP_MODE_FREEZE
public static final int COMMAND_PARAMETER_VALUE_STOP_MODE_FREEZE
Playback command stop mode: freeze the video.
See also:
Constant Value: 2 (0x00000002)
PLAYBACK_COMMAND_TYPE_SELECT_TRACK
public static final String PLAYBACK_COMMAND_TYPE_SELECT_TRACK
Playback command type: select the given track.
Constant Value: "select_track"
PLAYBACK_COMMAND_TYPE_SET_STREAM_VOLUME
public static final String PLAYBACK_COMMAND_TYPE_SET_STREAM_VOLUME
Playback command type: set the volume.
Constant Value: "set_stream_volume"
PLAYBACK_COMMAND_TYPE_STOP
public static final String PLAYBACK_COMMAND_TYPE_STOP
Playback command type: stop the playback.
Constant Value: "stop"
PLAYBACK_COMMAND_TYPE_TUNE
public static final String PLAYBACK_COMMAND_TYPE_TUNE
Playback command type: tune to the given channel.
See also:
Constant Value: "tune"
PLAYBACK_COMMAND_TYPE_TUNE_NEXT
public static final String PLAYBACK_COMMAND_TYPE_TUNE_NEXT
Playback command type: tune to the next channel.
Constant Value: "tune_next"
PLAYBACK_COMMAND_TYPE_TUNE_PREV
public static final String PLAYBACK_COMMAND_TYPE_TUNE_PREV
Playback command type: tune to the previous channel.
Constant Value: "tune_previous"
SERVICE_INTERFACE
public static final String SERVICE_INTERFACE
This is the interface name that a service implementing a TV Interactive App service should
say that it supports -- that is, this is the action it uses for its intent filter. To be
supported, the service must also require the
Manifest.permission.BIND_TV_INTERACTIVE_APP
permission so that other
applications cannot abuse it.
Constant Value: "android.media.tv.interactive.TvInteractiveAppService"
SERVICE_META_DATA
public static final String SERVICE_META_DATA
Name under which a TvInteractiveAppService component publishes information about itself. This
meta-data must reference an XML resource containing an
<
tag.tv-interactive-app
>
Constant Value: "android.media.tv.interactive.app"
TIME_SHIFT_COMMAND_TYPE_PAUSE
public static final String TIME_SHIFT_COMMAND_TYPE_PAUSE
Time shift command type: pause.
See also:
Constant Value: "pause"
TIME_SHIFT_COMMAND_TYPE_PLAY
public static final String TIME_SHIFT_COMMAND_TYPE_PLAY
Time shift command type: play.
See also:
Constant Value: "play"
TIME_SHIFT_COMMAND_TYPE_RESUME
public static final String TIME_SHIFT_COMMAND_TYPE_RESUME
Time shift command type: resume.
See also:
Constant Value: "resume"
TIME_SHIFT_COMMAND_TYPE_SEEK_TO
public static final String TIME_SHIFT_COMMAND_TYPE_SEEK_TO
Time shift command type: seek to.
See also:
Constant Value: "seek_to"
TIME_SHIFT_COMMAND_TYPE_SET_MODE
public static final String TIME_SHIFT_COMMAND_TYPE_SET_MODE
Time shift command type: set time shift mode.
Constant Value: "set_mode"
TIME_SHIFT_COMMAND_TYPE_SET_PLAYBACK_PARAMS
public static final String TIME_SHIFT_COMMAND_TYPE_SET_PLAYBACK_PARAMS
Time shift command type: set playback params.
Constant Value: "set_playback_params"
Public constructors
TvInteractiveAppService
public TvInteractiveAppService ()
Public methods
notifyStateChanged
public final void notifyStateChanged (int type, int state, int error)
Notifies the system when the state of the interactive app RTE has been changed.
onAppLinkCommand
public void onAppLinkCommand (Bundle command)
Called when app link command is received.
Parameters | |
---|---|
command |
Bundle : This value cannot be null . |
onBind
public final IBinder onBind (Intent intent)
Return the communication channel to the service. May return null if
clients can not bind to the service. The returned
IBinder
is usually for a complex interface
that has been described using
aidl.
Note that unlike other application components, calls on to the IBinder interface returned here may not happen on the main thread of the process. More information about the main thread can be found in Processes and Threads.
Parameters | |
---|---|
intent |
Intent : This value cannot be null . |
Returns | |
---|---|
IBinder |
This value may be null . |
onCreateSession
public abstract TvInteractiveAppService.Session onCreateSession (String iAppServiceId, int type)
Returns a concrete implementation of Session
.
May return null
if this TV Interactive App service fails to create a session for
some reason.
Parameters | |
---|---|
iAppServiceId |
String : The ID of the TV Interactive App associated with the session.
This value cannot be null . |
type |
int : The type of the TV Interactive App associated with the session.
Value is TvInteractiveAppServiceInfo.INTERACTIVE_APP_TYPE_HBBTV , TvInteractiveAppServiceInfo.INTERACTIVE_APP_TYPE_ATSC , TvInteractiveAppServiceInfo.INTERACTIVE_APP_TYPE_GINGA , TvInteractiveAppServiceInfo.INTERACTIVE_APP_TYPE_TARGETED_AD , or TvInteractiveAppServiceInfo.INTERACTIVE_APP_TYPE_OTHER |
Returns | |
---|---|
TvInteractiveAppService.Session |
onRegisterAppLinkInfo
public void onRegisterAppLinkInfo (AppLinkInfo appLinkInfo)
Called when a request to register an Android application link info record is received.
Parameters | |
---|---|
appLinkInfo |
AppLinkInfo : This value cannot be null . |
onUnregisterAppLinkInfo
public void onUnregisterAppLinkInfo (AppLinkInfo appLinkInfo)
Called when a request to unregister an Android application link info record is received.
Parameters | |
---|---|
appLinkInfo |
AppLinkInfo : This value cannot be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-12-18 UTC.