Stay organized with collections
Save and categorize content based on your preferences.
OnExpirationUpdateListener
interface OnExpirationUpdateListener
Interface definition for a callback to be invoked when a drm session expiration update occurs
Summary
Public methods |
abstract Unit |
Called when a session expiration update occurs, to inform the app about the change in expiration time
|
Public methods
onExpirationUpdate
abstract fun onExpirationUpdate(
md: MediaDrm,
sessionId: ByteArray,
expirationTime: Long
): Unit
Called when a session expiration update occurs, to inform the app about the change in expiration time
Parameters |
md |
MediaDrm: the MediaDrm object on which the event occurred This value cannot be null . |
sessionId |
ByteArray: the DRM session ID on which the event occurred This value cannot be null . |
expirationTime |
Long: the new expiration time for the keys in the session. The time is in milliseconds, relative to the Unix epoch. A time of 0 indicates that the keys never expire. |
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.OnExpirationUpdateListener\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnExpirationUpdateListener\n==========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/MediaDrm.OnExpirationUpdateListener \"View this page in Java\") \n\n```\ninterface OnExpirationUpdateListener\n```\n\n|--------------------------------------------------------|\n| [android.media.MediaDrm.OnExpirationUpdateListener](#) |\n\nInterface definition for a callback to be invoked when a drm session expiration update occurs\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onExpirationUpdate](#onExpirationUpdate(android.media.MediaDrm,%20kotlin.ByteArray,%20kotlin.Long))`(`md:` `[MediaDrm](/reference/kotlin/android/media/MediaDrm)`, `sessionId:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)`, `expirationTime:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Called when a session expiration update occurs, to inform the app about the change in expiration time |\n\nPublic methods\n--------------\n\n### onExpirationUpdate\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onExpirationUpdate(\n md: MediaDrm, \n sessionId: ByteArray, \n expirationTime: Long\n): Unit\n```\n\nCalled when a session expiration update occurs, to inform the app about the change in expiration time\n\n| Parameters ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `md` | [MediaDrm](/reference/kotlin/android/media/MediaDrm): the MediaDrm object on which the event occurred This value cannot be `null`. |\n| `sessionId` | [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html): the DRM session ID on which the event occurred This value cannot be `null`. |\n| `expirationTime` | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html): the new expiration time for the keys in the session. The time is in milliseconds, relative to the Unix epoch. A time of 0 indicates that the keys never expire. |"]]