TvInteractiveAppView.TvInteractiveAppCallback


public static abstract class TvInteractiveAppView.TvInteractiveAppCallback
extends Object

java.lang.Object
   ↳ android.media.tv.interactive.TvInteractiveAppView.TvInteractiveAppCallback


Callback used to receive various status updates on the TvInteractiveAppView.

Summary

Public constructors

TvInteractiveAppCallback()

Public methods

void onBiInteractiveAppCreated(String iAppServiceId, Uri biIAppUri, String biIAppId)

This is called when broadcast-independent (BI) interactive app is created.

void onPlaybackCommandRequest(String iAppServiceId, String cmdType, Bundle parameters)

This is called when a playback command is requested to be processed by the related TV input.

void onRequestAvailableSpeeds(String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestAvailableSpeeds() is called.

void onRequestCertificate(String iAppServiceId, String host, int port)

This is called when TvInteractiveAppService.Session.requestCertificate(String, int) is called.

void onRequestCurrentChannelLcn(String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestCurrentChannelLcn() is called.

void onRequestCurrentChannelUri(String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestCurrentChannelUri() is called.

void onRequestCurrentTvInputId(String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestCurrentTvInputId() is called.

void onRequestCurrentVideoBounds(String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestCurrentVideoBounds() is called.

void onRequestScheduleRecording(String iAppServiceId, String requestId, String inputId, Uri channelUri, long startTime, long duration, int repeatDays, Bundle params)

This is called when TvInteractiveAppService.Session.requestScheduleRecording(String, String, Uri, long, long, int, Bundle) is called.

void onRequestScheduleRecording(String iAppServiceId, String requestId, String inputId, Uri channelUri, Uri programUri, Bundle params)

This is called when TvInteractiveAppService.Session.requestScheduleRecording(String, String, Uri, Uri, Bundle) is called.

void onRequestSelectedTrackInfo(String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestSelectedTrackInfo() is called.

void onRequestSigning(String iAppServiceId, String signingId, String algorithm, String alias, byte[] data)

This is called when TvInteractiveAppService.Session.requestSigning(String, String, String, byte[]) is called.

void onRequestSigning(String iAppServiceId, String signingId, String algorithm, String host, int port, byte[] data)

This is called when TvInteractiveAppService.Session.requestSigning(String, String, String, int, byte[]) is called.

void onRequestStartRecording(String iAppServiceId, String requestId, Uri programUri)

This is called when TvInteractiveAppService.Session.requestStartRecording(String, Uri) is called.

void onRequestStopRecording(String iAppServiceId, String recordingId)

This is called when TvInteractiveAppService.Session.requestStopRecording(String) is called.

void onRequestStreamVolume(String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestStreamVolume() is called.

void onRequestTimeShiftMode(String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestTimeShiftMode() is called.

void onRequestTrackInfoList(String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestTrackInfoList() is called.

void onRequestTvRecordingInfo(String iAppServiceId, String recordingId)

This is called when TvInteractiveAppService.Session.requestTvRecordingInfo(String) is called.

void onRequestTvRecordingInfoList(String iAppServiceId, int type)

This is called when TvInteractiveAppService.Session.requestTvRecordingInfoList(int) is called.

void onSetTvRecordingInfo(String iAppServiceId, String recordingId, TvRecordingInfo recordingInfo)

This is called when TvInteractiveAppService.Session.setTvRecordingInfo(String, TvRecordingInfo) is called.

void onSetVideoBounds(String iAppServiceId, Rect rect)

This is called when TvInteractiveAppService.Session.setVideoBounds(Rect) is called.

void onStateChanged(String iAppServiceId, int state, int err)

This is called when the state of corresponding interactive app is changed.

void onTeletextAppStateChanged(String iAppServiceId, int state)

This is called when the digital teletext app state is changed.

void onTimeShiftCommandRequest(String iAppServiceId, String cmdType, Bundle parameters)

This is called when a time shift command is requested to be processed by the related TV input.

Inherited methods

Public constructors

TvInteractiveAppCallback

public TvInteractiveAppCallback ()

Public methods

onBiInteractiveAppCreated

Added in API level 33
public void onBiInteractiveAppCreated (String iAppServiceId, 
                Uri biIAppUri, 
                String biIAppId)

This is called when broadcast-independent (BI) interactive app is created.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

biIAppUri Uri: URI associated this BI interactive app. This is the same URI in TvInteractiveAppView.createBiInteractiveApp(android.net.Uri, android.os.Bundle) This value cannot be null.

biIAppId String: BI interactive app ID, which can be used to destroy the BI interactive app. null if it's not created successfully.

onPlaybackCommandRequest

Added in API level 33
public void onPlaybackCommandRequest (String iAppServiceId, 
                String cmdType, 
                Bundle parameters)

This is called when a playback command is requested to be processed by the related TV input.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

cmdType String: type of the command This value cannot be null. Value is TvInteractiveAppService.PLAYBACK_COMMAND_TYPE_TUNE, TvInteractiveAppService.PLAYBACK_COMMAND_TYPE_TUNE_NEXT, TvInteractiveAppService.PLAYBACK_COMMAND_TYPE_TUNE_PREV, TvInteractiveAppService.PLAYBACK_COMMAND_TYPE_STOP, TvInteractiveAppService.PLAYBACK_COMMAND_TYPE_SET_STREAM_VOLUME, TvInteractiveAppService.PLAYBACK_COMMAND_TYPE_SELECT_TRACK, or android.media.tv.interactive.TvInteractiveAppService.PLAYBACK_COMMAND_TYPE_FREEZE

parameters Bundle: parameters of the command This value cannot be null.

onRequestAvailableSpeeds

Added in API level 34
public void onRequestAvailableSpeeds (String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestAvailableSpeeds() is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

onRequestCertificate

public void onRequestCertificate (String iAppServiceId, 
                String host, 
                int port)

This is called when TvInteractiveAppService.Session.requestCertificate(String, int) is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

host String: The hostname of the SSL authentication server. This value cannot be null.

port int: The port of the SSL authentication server.

onRequestCurrentChannelLcn

Added in API level 33
public void onRequestCurrentChannelLcn (String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestCurrentChannelLcn() is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

onRequestCurrentChannelUri

Added in API level 33
public void onRequestCurrentChannelUri (String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestCurrentChannelUri() is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

onRequestCurrentTvInputId

Added in API level 33
public void onRequestCurrentTvInputId (String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestCurrentTvInputId() is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

onRequestCurrentVideoBounds

Added in API level 34
public void onRequestCurrentVideoBounds (String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestCurrentVideoBounds() is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

onRequestScheduleRecording

Added in API level 34
public void onRequestScheduleRecording (String iAppServiceId, 
                String requestId, 
                String inputId, 
                Uri channelUri, 
                long startTime, 
                long duration, 
                int repeatDays, 
                Bundle params)

This is called when TvInteractiveAppService.Session.requestScheduleRecording(String, String, Uri, long, long, int, Bundle) is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

requestId String: The ID of this request which is used to match the corresponding response. The request ID in TvInteractiveAppView.notifyRecordingScheduled(java.lang.String, java.lang.String) for this request is the same as the ID sent here. This should be defined by the TIAS and can be any string. Should this API be called with the same requestId twice, both requests should be handled regardless by the TV application. This value cannot be null.

inputId String: The ID of the TV input for the given channel. This value cannot be null.

channelUri Uri: The URI of a channel to be recorded. This value cannot be null.

startTime long: The start time of the recording in milliseconds since epoch.

duration long: The duration of the recording in milliseconds.

repeatDays int: The repeated days. 0 if not repeated.

params Bundle: Domain-specific data for this tune request. Keys must be a scoped name, i.e. prefixed with a package name you own, so that different developers will not create conflicting keys. This value cannot be null.

onRequestScheduleRecording

Added in API level 34
public void onRequestScheduleRecording (String iAppServiceId, 
                String requestId, 
                String inputId, 
                Uri channelUri, 
                Uri programUri, 
                Bundle params)

This is called when TvInteractiveAppService.Session.requestScheduleRecording(String, String, Uri, Uri, Bundle) is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

requestId String: The ID of this request which is used to match the corresponding response. The request ID in TvInteractiveAppView.notifyRecordingScheduled(java.lang.String, java.lang.String) for this request is the same as the ID sent here. This should be defined by the TIAS and can be any string. Should this API be called with the same requestId twice, both requests should be handled regardless by the TV application. This value cannot be null.

inputId String: The ID of the TV input for the given channel. This value cannot be null.

channelUri Uri: The URI of a channel to be recorded. This value cannot be null.

programUri Uri: The URI of the TV program to be recorded. This value cannot be null.

params Bundle: Domain-specific data for this tune request. Keys must be a scoped name, i.e. prefixed with a package name you own, so that different developers will not create conflicting keys. This value cannot be null.

onRequestSelectedTrackInfo

public void onRequestSelectedTrackInfo (String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestSelectedTrackInfo() is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

onRequestSigning

Added in API level 33
public void onRequestSigning (String iAppServiceId, 
                String signingId, 
                String algorithm, 
                String alias, 
                byte[] data)

This is called when TvInteractiveAppService.Session.requestSigning(String, String, String, byte[]) is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

signingId String: the ID to identify the request. This value cannot be null.

algorithm String: the standard name of the signature algorithm requested, such as MD5withRSA, SHA256withDSA, etc. This value cannot be null.

alias String: the alias of the corresponding KeyStore. This value cannot be null.

data byte: the original bytes to be signed. This value cannot be null.

onRequestSigning

public void onRequestSigning (String iAppServiceId, 
                String signingId, 
                String algorithm, 
                String host, 
                int port, 
                byte[] data)

This is called when TvInteractiveAppService.Session.requestSigning(String, String, String, int, byte[]) is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

signingId String: the ID to identify the request. This value cannot be null.

algorithm String: the standard name of the signature algorithm requested, such as MD5withRSA, SHA256withDSA, etc. This value cannot be null.

host String: The hostname of the SSL authentication server. This value cannot be null.

port int: The port of the SSL authentication server.

data byte: the original bytes to be signed. This value cannot be null.

onRequestStartRecording

Added in API level 34
public void onRequestStartRecording (String iAppServiceId, 
                String requestId, 
                Uri programUri)

This is called when TvInteractiveAppService.Session.requestStartRecording(String, Uri) is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

requestId String: The ID of this request which is used to match the corresponding response. The request ID in TvInteractiveAppView.notifyRecordingStarted(java.lang.String, java.lang.String) for this request is the same as the ID sent here. This should be defined by the TIAS and can be any string. Should this API be called with the same requestId twice, both requests should be handled regardless by the TV application. This value cannot be null.

programUri Uri: The URI of the program to record This value may be null.

onRequestStopRecording

Added in API level 34
public void onRequestStopRecording (String iAppServiceId, 
                String recordingId)

This is called when TvInteractiveAppService.Session.requestStopRecording(String) is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

recordingId String: The ID of the recording to stop. This is provided by the TV app in TvInteractiveAppView.notifyRecordingStarted(java.lang.String, java.lang.String) This value cannot be null.

onRequestStreamVolume

Added in API level 33
public void onRequestStreamVolume (String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestStreamVolume() is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

onRequestTimeShiftMode

Added in API level 34
public void onRequestTimeShiftMode (String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestTimeShiftMode() is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

onRequestTrackInfoList

Added in API level 33
public void onRequestTrackInfoList (String iAppServiceId)

This is called when TvInteractiveAppService.Session.requestTrackInfoList() is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

onRequestTvRecordingInfo

Added in API level 34
public void onRequestTvRecordingInfo (String iAppServiceId, 
                String recordingId)

This is called when TvInteractiveAppService.Session.requestTvRecordingInfo(String) is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

recordingId String: The ID of the recording to get the info for. This is provided by the TV app in TvInteractiveAppView.notifyRecordingStarted(String, String) This value cannot be null.

onRequestTvRecordingInfoList

Added in API level 34
public void onRequestTvRecordingInfoList (String iAppServiceId, 
                int type)

This is called when TvInteractiveAppService.Session.requestTvRecordingInfoList(int) is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

type int: The type of recording requested to retrieve. Value is TvRecordingInfo.RECORDING_SCHEDULED, TvRecordingInfo.RECORDING_IN_PROGRESS, or TvRecordingInfo.RECORDING_ALL

onSetTvRecordingInfo

Added in API level 34
public void onSetTvRecordingInfo (String iAppServiceId, 
                String recordingId, 
                TvRecordingInfo recordingInfo)

This is called when TvInteractiveAppService.Session.setTvRecordingInfo(String, TvRecordingInfo) is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

recordingId String: The ID of the recording to set the info for. This is provided by the TV app in TvInteractiveAppView.notifyRecordingStarted(String, String) This value cannot be null.

recordingInfo TvRecordingInfo: The TvRecordingInfo to set to the recording. This value cannot be null.

onSetVideoBounds

Added in API level 33
public void onSetVideoBounds (String iAppServiceId, 
                Rect rect)

This is called when TvInteractiveAppService.Session.setVideoBounds(Rect) is called.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

rect Rect: This value cannot be null.

onStateChanged

Added in API level 33
public void onStateChanged (String iAppServiceId, 
                int state, 
                int err)

This is called when the state of corresponding interactive app is changed.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

state int: the current state. Value is TvInteractiveAppManager.INTERACTIVE_APP_STATE_STOPPED, TvInteractiveAppManager.INTERACTIVE_APP_STATE_RUNNING, or TvInteractiveAppManager.INTERACTIVE_APP_STATE_ERROR

err int: the error code for error state. TvInteractiveAppManager.ERROR_NONE is used when the state is not TvInteractiveAppManager.INTERACTIVE_APP_STATE_ERROR. Value is TvInteractiveAppManager.ERROR_NONE, TvInteractiveAppManager.ERROR_UNKNOWN, TvInteractiveAppManager.ERROR_NOT_SUPPORTED, TvInteractiveAppManager.ERROR_WEAK_SIGNAL, TvInteractiveAppManager.ERROR_RESOURCE_UNAVAILABLE, TvInteractiveAppManager.ERROR_BLOCKED, TvInteractiveAppManager.ERROR_ENCRYPTED, or TvInteractiveAppManager.ERROR_UNKNOWN_CHANNEL

onTeletextAppStateChanged

Added in API level 33
public void onTeletextAppStateChanged (String iAppServiceId, 
                int state)

This is called when the digital teletext app state is changed.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

state int: digital teletext app current state. Value is TvInteractiveAppManager.TELETEXT_APP_STATE_SHOW, TvInteractiveAppManager.TELETEXT_APP_STATE_HIDE, or TvInteractiveAppManager.TELETEXT_APP_STATE_ERROR

onTimeShiftCommandRequest

Added in API level 34
public void onTimeShiftCommandRequest (String iAppServiceId, 
                String cmdType, 
                Bundle parameters)

This is called when a time shift command is requested to be processed by the related TV input.

Parameters
iAppServiceId String: The ID of the TV interactive app service bound to this view. This value cannot be null.

cmdType String: type of the command This value cannot be null. Value is TvInteractiveAppService.TIME_SHIFT_COMMAND_TYPE_PLAY, TvInteractiveAppService.TIME_SHIFT_COMMAND_TYPE_PAUSE, TvInteractiveAppService.TIME_SHIFT_COMMAND_TYPE_RESUME, TvInteractiveAppService.TIME_SHIFT_COMMAND_TYPE_SEEK_TO, TvInteractiveAppService.TIME_SHIFT_COMMAND_TYPE_SET_PLAYBACK_PARAMS, or TvInteractiveAppService.TIME_SHIFT_COMMAND_TYPE_SET_MODE

parameters Bundle: parameters of the command This value cannot be null.