TvAdView.TvAdCallback


public static abstract class TvAdView.TvAdCallback
extends Object

java.lang.Object
   ↳ android.media.tv.ad.TvAdView.TvAdCallback


Callback used to receive various status updates on the TvAdView.

Summary

Public constructors

TvAdCallback()

Public methods

void onRequestCurrentChannelUri(String serviceId)

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

void onRequestCurrentTvInputId(String serviceId)

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

void onRequestCurrentVideoBounds(String serviceId)

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

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

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

void onRequestTrackInfoList(String serviceId)

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

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

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

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

TvAdCallback

public TvAdCallback ()

Public methods

onRequestCurrentChannelUri

public void onRequestCurrentChannelUri (String serviceId)

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

public void onRequestCurrentTvInputId (String serviceId)

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

public void onRequestCurrentVideoBounds (String serviceId)

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

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

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 KeyStore. This value cannot be null.

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

onRequestTrackInfoList

public void onRequestTrackInfoList (String serviceId)

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

public void onStateChanged (String serviceId, 
                int state, 
                int err)

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