Stay organized with collections
Save and categorize content based on your preferences.
public
static
interface
MediaDrm.OnEventListener
android.media.MediaDrm.OnEventListener
|
Interface definition for a callback to be invoked when a drm event
occurs
Summary
Public methods |
abstract
void
|
onEvent(MediaDrm md, byte[] sessionId, int event, int extra, byte[] data)
Called when an event occurs that requires the app to be notified
|
Public methods
public abstract void onEvent (MediaDrm md,
byte[] sessionId,
int event,
int extra,
byte[] data)
Called when an event occurs that requires the app to be notified
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,["# MediaDrm.OnEventListener\n\nAdded in [API level 18](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nMediaDrm.OnEventListener\n========================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/MediaDrm.OnEventListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nMediaDrm.OnEventListener\n`\n\n\n`\n\n\n`\n\n|----------------------------------------|\n| android.media.MediaDrm.OnEventListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface definition for a callback to be invoked when a drm event\noccurs\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onEvent](/reference/android/media/MediaDrm.OnEventListener#onEvent(android.media.MediaDrm,%20byte[],%20int,%20int,%20byte[]))`(`[MediaDrm](/reference/android/media/MediaDrm)` md, byte[] sessionId, int event, int extra, byte[] data) ` Called when an event occurs that requires the app to be notified |\n\nPublic methods\n--------------\n\n### onEvent\n\nAdded in [API level 18](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onEvent (MediaDrm md, \n byte[] sessionId, \n int event, \n int extra, \n byte[] data)\n```\n\nCalled when an event occurs that requires the app to be notified\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `md` | `MediaDrm`: the MediaDrm object on which the event occurred This value cannot be `null`. \u003cbr /\u003e |\n| `sessionId` | `byte`: the DRM session ID on which the event occurred, or `null` if there is no session ID associated with the event. \u003cbr /\u003e |\n| `event` | `int`: indicates the event type Value is [MediaDrm.EVENT_PROVISION_REQUIRED](/reference/android/media/MediaDrm#EVENT_PROVISION_REQUIRED), [MediaDrm.EVENT_KEY_REQUIRED](/reference/android/media/MediaDrm#EVENT_KEY_REQUIRED), [MediaDrm.EVENT_KEY_EXPIRED](/reference/android/media/MediaDrm#EVENT_KEY_EXPIRED), [MediaDrm.EVENT_VENDOR_DEFINED](/reference/android/media/MediaDrm#EVENT_VENDOR_DEFINED), or [MediaDrm.EVENT_SESSION_RECLAIMED](/reference/android/media/MediaDrm#EVENT_SESSION_RECLAIMED) \u003cbr /\u003e |\n| `extra` | `int`: an secondary error code \u003cbr /\u003e |\n| `data` | `byte`: optional byte array of data that may be associated with the event This value may be `null`. \u003cbr /\u003e |"]]