Added in API level 26

MediaCas.EventListener


public static interface MediaCas.EventListener

android.media.MediaCas.EventListener


An interface registered by the caller to MediaCas.setEventListener(EventListener, Handler) to receives scheme-specific notifications from a MediaCas instance.

Summary

Public methods

abstract void onEvent(MediaCas mediaCas, int event, int arg, byte[] data)

Notify the listener of a scheme-specific event from the CA system.

default void onPluginStatusUpdate(MediaCas mediaCas, int status, int arg)

Notify the listener that the cas plugin status is updated.

default void onResourceLost(MediaCas mediaCas)

Notify the listener that the session resources was lost.

default void onSessionEvent(MediaCas mediaCas, MediaCas.Session session, int event, int arg, byte[] data)

Notify the listener of a scheme-specific session event from CA system.

Public methods

onEvent

Added in API level 26
public abstract void onEvent (MediaCas mediaCas, 
                int event, 
                int arg, 
                byte[] data)

Notify the listener of a scheme-specific event from the CA system.

Parameters
mediaCas MediaCas: the MediaCas object to receive this event. This value cannot be null.

event int: an integer whose meaning is scheme-specific.

arg int: an integer whose meaning is scheme-specific.

data byte: a byte array of data whose format and meaning are scheme-specific. This value may be null.

onPluginStatusUpdate

Added in API level 30
public void onPluginStatusUpdate (MediaCas mediaCas, 
                int status, 
                int arg)

Notify the listener that the cas plugin status is updated.

Parameters
mediaCas MediaCas: the MediaCas object to receive this event. This value cannot be null.

status int: the plugin status which is updated. Value is MediaCas.PLUGIN_STATUS_PHYSICAL_MODULE_CHANGED, or MediaCas.PLUGIN_STATUS_SESSION_NUMBER_CHANGED

arg int: an integer whose meaning is specific to the status to be updated.

onResourceLost

Added in API level 30
public void onResourceLost (MediaCas mediaCas)

Notify the listener that the session resources was lost.

Parameters
mediaCas MediaCas: the MediaCas object to receive this event. This value cannot be null.

onSessionEvent

Added in API level 29
public void onSessionEvent (MediaCas mediaCas, 
                MediaCas.Session session, 
                int event, 
                int arg, 
                byte[] data)

Notify the listener of a scheme-specific session event from CA system.

Parameters
mediaCas MediaCas: the MediaCas object to receive this event. This value cannot be null.

session MediaCas.Session: session object which the event is for. This value cannot be null.

event int: an integer whose meaning is scheme-specific.

arg int: an integer whose meaning is scheme-specific.

data byte: a byte array of data whose format and meaning are scheme-specific. This value may be null.