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 | 
            onRequestCurrentChannelUri(serviceId: String)This is called when   | 
        
| open Unit | 
            onRequestCurrentTvInputId(serviceId: String)This is called when   | 
        
| open Unit | 
            onRequestCurrentVideoBounds(serviceId: String)This is called when   | 
        
| open Unit | 
            onRequestSigning(serviceId: String, signingId: String, algorithm: String, alias: String, data: ByteArray)This is called when   | 
        
| open Unit | 
            onRequestTrackInfoList(serviceId: String)This is called when   | 
        
| 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
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
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
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
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
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. | 
          
onStateChanged
open fun onStateChanged(
serviceId: String,
state: Int,
err: Int
): Unit
This is called when the state of corresponding AD service is changed.
| Parameters | |
|---|---|
serviceId | 
            String: The ID of the AD service bound to this view. This value cannot be null. | 
          
state | 
            Int: the current state. Value is android.media.tv.ad.TvAdManager#SESSION_STATE_STOPPED, android.media.tv.ad.TvAdManager#SESSION_STATE_RUNNING, or android.media.tv.ad.TvAdManager#SESSION_STATE_ERROR | 
          
err | 
            Int: the error code for error state. TvAdManager.ERROR_NONE is used when the state is not TvAdManager.SESSION_STATE_ERROR. Value is android.media.tv.ad.TvAdManager#ERROR_NONE, android.media.tv.ad.TvAdManager#ERROR_UNKNOWN, android.media.tv.ad.TvAdManager#ERROR_NOT_SUPPORTED, android.media.tv.ad.TvAdManager#ERROR_WEAK_SIGNAL, android.media.tv.ad.TvAdManager#ERROR_RESOURCE_UNAVAILABLE, android.media.tv.ad.TvAdManager#ERROR_BLOCKED, android.media.tv.ad.TvAdManager#ERROR_ENCRYPTED, or android.media.tv.ad.TvAdManager#ERROR_UNKNOWN_CHANNEL |