Added in API level 36

TvAdCallback


abstract class TvAdCallback
kotlin.Any
   ↳ android.media.tv.ad.TvAdView.TvAdCallback

Callback used to receive various status updates on the TvAdView.

Summary

Public constructors

Public methods
open Unit

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

open Unit

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

open Unit

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

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

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

open Unit

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

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

This is called when the state of corresponding AD service is changed.

Public constructors

TvAdCallback

TvAdCallback()

Public methods

onRequestCurrentChannelUri

Added in API level 36
open fun onRequestCurrentChannelUri(serviceId: String): Unit

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

Parameters
serviceId String: The ID of the AD service bound to this view. This value cannot be null.

onRequestCurrentTvInputId

Added in API level 36
open fun onRequestCurrentTvInputId(serviceId: String): Unit

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

Parameters
serviceId String: The ID of the AD service bound to this view. This value cannot be null.

onRequestCurrentVideoBounds

Added in API level 36
open fun onRequestCurrentVideoBounds(serviceId: String): Unit

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

Parameters
serviceId String: The ID of the TV AD service bound to this view. This value cannot be null.

onRequestSigning

Added in API level 36
open fun onRequestSigning(
    serviceId: String,
    signingId: String,
    algorithm: String,
    alias: String,
    data: ByteArray
): Unit

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

Parameters
serviceId String: The ID of the AD 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.

onRequestTrackInfoList

Added in API level 36
open fun onRequestTrackInfoList(serviceId: String): Unit

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

Parameters
serviceId String: The ID of the AD service bound to this view. This value cannot be null.