Stay organized with collections
Save and categorize content based on your preferences.
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
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 . |
public void onPluginStatusUpdate (MediaCas mediaCas,
int status,
int arg)
Notify the listener that the cas plugin status is updated.
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 . |
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 . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# MediaCas.EventListener\n\nAdded in [API level 26](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nMediaCas.EventListener\n======================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/MediaCas.EventListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nMediaCas.EventListener\n`\n\n\n`\n\n\n`\n\n|--------------------------------------|\n| android.media.MediaCas.EventListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nAn interface registered by the caller to [MediaCas.setEventListener(EventListener, Handler)](/reference/android/media/MediaCas#setEventListener(android.media.MediaCas.EventListener,%20android.os.Handler))\nto receives scheme-specific notifications from a MediaCas instance.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onEvent](/reference/android/media/MediaCas.EventListener#onEvent(android.media.MediaCas,%20int,%20int,%20byte[]))`(`[MediaCas](/reference/android/media/MediaCas)` mediaCas, int event, int arg, byte[] data) ` Notify the listener of a scheme-specific event from the CA system. |\n| ` default void` | ` `[onPluginStatusUpdate](/reference/android/media/MediaCas.EventListener#onPluginStatusUpdate(android.media.MediaCas,%20int,%20int))`(`[MediaCas](/reference/android/media/MediaCas)` mediaCas, int status, int arg) ` Notify the listener that the cas plugin status is updated. |\n| ` default void` | ` `[onResourceLost](/reference/android/media/MediaCas.EventListener#onResourceLost(android.media.MediaCas))`(`[MediaCas](/reference/android/media/MediaCas)` mediaCas) ` Notify the listener that the session resources was lost. |\n| ` default void` | ` `[onSessionEvent](/reference/android/media/MediaCas.EventListener#onSessionEvent(android.media.MediaCas,%20android.media.MediaCas.Session,%20int,%20int,%20byte[]))`(`[MediaCas](/reference/android/media/MediaCas)` mediaCas, `[MediaCas.Session](/reference/android/media/MediaCas.Session)` session, int event, int arg, byte[] data) ` Notify the listener of a scheme-specific session event from CA system. |\n\nPublic methods\n--------------\n\n### onEvent\n\nAdded in [API level 26](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onEvent (MediaCas mediaCas, \n int event, \n int arg, \n byte[] data)\n```\n\nNotify the listener of a scheme-specific event from the CA system.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|-------------------------------------------------------------------------------------------------------------|\n| `mediaCas` | `MediaCas`: the MediaCas object to receive this event. This value cannot be `null`. \u003cbr /\u003e |\n| `event` | `int`: an integer whose meaning is scheme-specific. \u003cbr /\u003e |\n| `arg` | `int`: an integer whose meaning is scheme-specific. \u003cbr /\u003e |\n| `data` | `byte`: a byte array of data whose format and meaning are scheme-specific. This value may be `null`. \u003cbr /\u003e |\n\n### onPluginStatusUpdate\n\nAdded in [API level 30](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic void onPluginStatusUpdate (MediaCas mediaCas, \n int status, \n int arg)\n```\n\nNotify the listener that the cas plugin status is updated.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `mediaCas` | `MediaCas`: the MediaCas object to receive this event. This value cannot be `null`. \u003cbr /\u003e |\n| `status` | `int`: the plugin status which is updated. Value is [MediaCas.PLUGIN_STATUS_PHYSICAL_MODULE_CHANGED](/reference/android/media/MediaCas#PLUGIN_STATUS_PHYSICAL_MODULE_CHANGED), or [MediaCas.PLUGIN_STATUS_SESSION_NUMBER_CHANGED](/reference/android/media/MediaCas#PLUGIN_STATUS_SESSION_NUMBER_CHANGED) \u003cbr /\u003e |\n| `arg` | `int`: an integer whose meaning is specific to the status to be updated. \u003cbr /\u003e |\n\n### onResourceLost\n\nAdded in [API level 30](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic void onResourceLost (MediaCas mediaCas)\n```\n\nNotify the listener that the session resources was lost.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|--------------------------------------------------------------------------------------------|\n| `mediaCas` | `MediaCas`: the MediaCas object to receive this event. This value cannot be `null`. \u003cbr /\u003e |\n\n### onSessionEvent\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic void onSessionEvent (MediaCas mediaCas, \n MediaCas.Session session, \n int event, \n int arg, \n byte[] data)\n```\n\nNotify the listener of a scheme-specific session event from CA system.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|-------------------------------------------------------------------------------------------------------------|\n| `mediaCas` | `MediaCas`: the MediaCas object to receive this event. This value cannot be `null`. \u003cbr /\u003e |\n| `session` | `MediaCas.Session`: session object which the event is for. This value cannot be `null`. \u003cbr /\u003e |\n| `event` | `int`: an integer whose meaning is scheme-specific. \u003cbr /\u003e |\n| `arg` | `int`: an integer whose meaning is scheme-specific. \u003cbr /\u003e |\n| `data` | `byte`: a byte array of data whose format and meaning are scheme-specific. This value may be `null`. \u003cbr /\u003e |"]]