Added in API level 33

TvInteractiveAppCallback


abstract class TvInteractiveAppCallback
kotlin.Any
   ↳ android.media.tv.interactive.TvInteractiveAppView.TvInteractiveAppCallback

Callback used to receive various status updates on the TvInteractiveAppView.

Summary

Public constructors

Public methods
open Unit
onBiInteractiveAppCreated(iAppServiceId: String, biIAppUri: Uri, biIAppId: String?)

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

open Unit
onPlaybackCommandRequest(iAppServiceId: String, cmdType: String, parameters: Bundle)

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

open Unit

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

open Unit
onRequestCertificate(iAppServiceId: String, host: String, port: Int)

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

open Unit

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

open Unit

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

open Unit

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

open Unit

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

open Unit
onRequestScheduleRecording(iAppServiceId: String, requestId: String, inputId: String, channelUri: Uri, programUri: Uri, params: Bundle)

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

open Unit
onRequestScheduleRecording(iAppServiceId: String, requestId: String, inputId: String, channelUri: Uri, startTime: Long, duration: Long, repeatDays: Int, params: Bundle)

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

open Unit

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

open Unit
onRequestSigning(iAppServiceId: String, signingId: String, algorithm: String, alias: String, data: ByteArray)

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

open Unit
onRequestSigning(iAppServiceId: String, signingId: String, algorithm: String, host: String, port: Int, data: ByteArray)

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

open Unit
onRequestStartRecording(iAppServiceId: String, requestId: String, programUri: Uri?)

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

open Unit
onRequestStopRecording(iAppServiceId: String, recordingId: String)

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

open Unit
onRequestStreamVolume(iAppServiceId: String)

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

open Unit

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

open Unit

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

open Unit
onRequestTvRecordingInfo(iAppServiceId: String, recordingId: String)

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

open Unit
onRequestTvRecordingInfoList(iAppServiceId: String, type: Int)

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

open Unit
onSetTvRecordingInfo(iAppServiceId: String, recordingId: String, recordingInfo: TvRecordingInfo)

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

open Unit
onSetVideoBounds(iAppServiceId: String, rect: Rect)

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

open Unit
onStateChanged(iAppServiceId: String, state: Int, err: Int)

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

open Unit
onTeletextAppStateChanged(iAppServiceId: String, state: Int)

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

open Unit
onTimeShiftCommandRequest(iAppServiceId: String, cmdType: String, parameters: Bundle)

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

Public constructors

TvInteractiveAppCallback

TvInteractiveAppCallback()

Public methods

onBiInteractiveAppCreated

Added in API level 33
open fun onBiInteractiveAppCreated(
    iAppServiceId: String,
    biIAppUri: Uri,
    biIAppId: String?
): Unit

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 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
open fun onPlaybackCommandRequest(
    iAppServiceId: String,
    cmdType: String,
    parameters: Bundle
): Unit

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 android.media.tv.interactive.TvInteractiveAppService#PLAYBACK_COMMAND_TYPE_TUNE, android.media.tv.interactive.TvInteractiveAppService#PLAYBACK_COMMAND_TYPE_TUNE_NEXT, android.media.tv.interactive.TvInteractiveAppService#PLAYBACK_COMMAND_TYPE_TUNE_PREV, android.media.tv.interactive.TvInteractiveAppService#PLAYBACK_COMMAND_TYPE_STOP, android.media.tv.interactive.TvInteractiveAppService#PLAYBACK_COMMAND_TYPE_SET_STREAM_VOLUME, android.media.tv.interactive.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
open fun onRequestAvailableSpeeds(iAppServiceId: String): Unit

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

open fun onRequestCertificate(
    iAppServiceId: String,
    host: String,
    port: Int
): Unit

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
open fun onRequestCurrentChannelLcn(iAppServiceId: String): Unit

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
open fun onRequestCurrentChannelUri(iAppServiceId: String): Unit

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
open fun onRequestCurrentTvInputId(iAppServiceId: String): Unit

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
open fun onRequestCurrentVideoBounds(iAppServiceId: String): Unit

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
open fun onRequestScheduleRecording(
    iAppServiceId: String,
    requestId: String,
    inputId: String,
    channelUri: Uri,
    programUri: Uri,
    params: Bundle
): Unit

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 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.

onRequestScheduleRecording

Added in API level 34
open fun onRequestScheduleRecording(
    iAppServiceId: String,
    requestId: String,
    inputId: String,
    channelUri: Uri,
    startTime: Long,
    duration: Long,
    repeatDays: Int,
    params: Bundle
): Unit

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 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.

onRequestSelectedTrackInfo

open fun onRequestSelectedTrackInfo(iAppServiceId: String): Unit

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
open fun onRequestSigning(
    iAppServiceId: String,
    signingId: String,
    algorithm: String,
    alias: String,
    data: ByteArray
): Unit

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 java.security.KeyStore. This value cannot be null.
data ByteArray: the original bytes to be signed. This value cannot be null.

onRequestSigning

open fun onRequestSigning(
    iAppServiceId: String,
    signingId: String,
    algorithm: String,
    host: String,
    port: Int,
    data: ByteArray
): Unit

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 ByteArray: the original bytes to be signed. This value cannot be null.

onRequestStartRecording

Added in API level 34
open fun onRequestStartRecording(
    iAppServiceId: String,
    requestId: String,
    programUri: Uri?
): Unit

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 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
open fun onRequestStopRecording(
    iAppServiceId: String,
    recordingId: String
): Unit

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 notifyRecordingStarted(java.lang.String,java.lang.String) This value cannot be null.

onRequestStreamVolume

Added in API level 33
open fun onRequestStreamVolume(iAppServiceId: String): Unit

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
open fun onRequestTimeShiftMode(iAppServiceId: String): Unit

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
open fun onRequestTrackInfoList(iAppServiceId: String): Unit

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
open fun onRequestTvRecordingInfo(
    iAppServiceId: String,
    recordingId: String
): Unit

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
open fun onRequestTvRecordingInfoList(
    iAppServiceId: String,
    type: Int
): Unit

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 android.media.tv.TvRecordingInfo#RECORDING_SCHEDULED, android.media.tv.TvRecordingInfo#RECORDING_IN_PROGRESS, or android.media.tv.TvRecordingInfo#RECORDING_ALL

onSetTvRecordingInfo

Added in API level 34
open fun onSetTvRecordingInfo(
    iAppServiceId: String,
    recordingId: String,
    recordingInfo: TvRecordingInfo
): Unit

This is called when TvInteractiveAppService.Session.setTvRecordingInfo(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 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
open fun onSetVideoBounds(
    iAppServiceId: String,
    rect: Rect
): Unit

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.

onTeletextAppStateChanged

Added in API level 33
open fun onTeletextAppStateChanged(
    iAppServiceId: String,
    state: Int
): Unit

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 android.media.tv.interactive.TvInteractiveAppManager#TELETEXT_APP_STATE_SHOW, android.media.tv.interactive.TvInteractiveAppManager#TELETEXT_APP_STATE_HIDE, or android.media.tv.interactive.TvInteractiveAppManager#TELETEXT_APP_STATE_ERROR

onTimeShiftCommandRequest

Added in API level 34
open fun onTimeShiftCommandRequest(
    iAppServiceId: String,
    cmdType: String,
    parameters: Bundle
): Unit

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 android.media.tv.interactive.TvInteractiveAppService#TIME_SHIFT_COMMAND_TYPE_PLAY, android.media.tv.interactive.TvInteractiveAppService#TIME_SHIFT_COMMAND_TYPE_PAUSE, android.media.tv.interactive.TvInteractiveAppService#TIME_SHIFT_COMMAND_TYPE_RESUME, android.media.tv.interactive.TvInteractiveAppService#TIME_SHIFT_COMMAND_TYPE_SEEK_TO, android.media.tv.interactive.TvInteractiveAppService#TIME_SHIFT_COMMAND_TYPE_SET_PLAYBACK_PARAMS, or android.media.tv.interactive.TvInteractiveAppService#TIME_SHIFT_COMMAND_TYPE_SET_MODE
parameters Bundle: parameters of the command This value cannot be null.