Stay organized with collections
Save and categorize content based on your preferences.
OnSessionLostStateListener
interface OnSessionLostStateListener
Interface definition for a callback to be invoked when the session state has been lost and is now invalid
Summary
Public methods |
abstract Unit |
Called when session state has lost state, to inform the app about the condition so it can close the session and open a new one to resume operation.
|
Public methods
onSessionLostState
abstract fun onSessionLostState(
md: MediaDrm,
sessionId: ByteArray
): Unit
Called when session state has lost state, to inform the app about the condition so it can close the session and open a new one to resume operation.
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 . |
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.OnSessionLostStateListener\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnSessionLostStateListener\n==========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/MediaDrm.OnSessionLostStateListener \"View this page in Java\") \n\n```\ninterface OnSessionLostStateListener\n```\n\n|--------------------------------------------------------|\n| [android.media.MediaDrm.OnSessionLostStateListener](#) |\n\nInterface definition for a callback to be invoked when the session state has been lost and is now invalid\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onSessionLostState](#onSessionLostState(android.media.MediaDrm,%20kotlin.ByteArray))`(`md:` `[MediaDrm](/reference/kotlin/android/media/MediaDrm)`, `sessionId:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)`)` Called when session state has lost state, to inform the app about the condition so it can close the session and open a new one to resume operation. |\n\nPublic methods\n--------------\n\n### onSessionLostState\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onSessionLostState(\n md: MediaDrm, \n sessionId: ByteArray\n): Unit\n```\n\nCalled when session state has lost state, to inform the app about the condition so it can close the session and open a new one to resume operation.\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`. |"]]