Stay organized with collections
Save and categorize content based on your preferences.
public
static
interface
MediaDrm.OnKeyStatusChangeListener
android.media.MediaDrm.OnKeyStatusChangeListener
|
Interface definition for a callback to be invoked when the keys in a drm
session change states.
Summary
Public methods |
abstract
void
|
onKeyStatusChange(MediaDrm md, byte[] sessionId, List<MediaDrm.KeyStatus> keyInformation, boolean hasNewUsableKey)
Called when the keys in a session change status, such as when the license
is renewed or expires.
|
Public methods
public abstract void onKeyStatusChange (MediaDrm md,
byte[] sessionId,
List<MediaDrm.KeyStatus> keyInformation,
boolean hasNewUsableKey)
Called when the keys in a session change status, such as when the license
is renewed or expires.
Parameters |
md |
MediaDrm : the MediaDrm object on which the event occurred
This value cannot be null . |
sessionId |
byte : the DRM session ID on which the event occurred
This value cannot be null . |
keyInformation |
List : a list of MediaDrm.KeyStatus
instances indicating the status for each key in the session
This value cannot be null . |
hasNewUsableKey |
boolean : indicates if a key has been added that is usable,
which may trigger an attempt to resume playback on the media stream
if it is currently blocked waiting for a key. |
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.OnKeyStatusChangeListener\n\nAdded in [API level 23](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nMediaDrm.OnKeyStatusChangeListener\n==================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/MediaDrm.OnKeyStatusChangeListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nMediaDrm.OnKeyStatusChangeListener\n`\n\n\n`\n\n\n`\n\n|--------------------------------------------------|\n| android.media.MediaDrm.OnKeyStatusChangeListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface definition for a callback to be invoked when the keys in a drm\nsession change states.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onKeyStatusChange](/reference/android/media/MediaDrm.OnKeyStatusChangeListener#onKeyStatusChange(android.media.MediaDrm,%20byte[],%20java.util.List\u003candroid.media.MediaDrm.KeyStatus\u003e,%20boolean))`(`[MediaDrm](/reference/android/media/MediaDrm)` md, byte[] sessionId, `[List](/reference/java/util/List)`\u003c`[MediaDrm.KeyStatus](/reference/android/media/MediaDrm.KeyStatus)`\u003e keyInformation, boolean hasNewUsableKey) ` Called when the keys in a session change status, such as when the license is renewed or expires. |\n\nPublic methods\n--------------\n\n### onKeyStatusChange\n\nAdded in [API level 23](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onKeyStatusChange (MediaDrm md, \n byte[] sessionId, \n List\u003cMediaDrm.KeyStatus\u003e keyInformation, \n boolean hasNewUsableKey)\n```\n\nCalled when the keys in a session change status, such as when the license\nis renewed or expires.\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 This value cannot be `null`. \u003cbr /\u003e |\n| `keyInformation` | `List`: a list of [MediaDrm.KeyStatus](/reference/android/media/MediaDrm.KeyStatus) instances indicating the status for each key in the session This value cannot be `null`. \u003cbr /\u003e |\n| `hasNewUsableKey` | `boolean`: indicates if a key has been added that is usable, which may trigger an attempt to resume playback on the media stream if it is currently blocked waiting for a key. \u003cbr /\u003e |"]]