Stay organized with collections
Save and categorize content based on your preferences.
class MediaCryptoException : Exception, MediaDrmThrowable
Exception thrown if MediaCrypto object could not be instantiated or if unable to perform an operation on the MediaCrypto object.
Summary
Public constructors
MediaCryptoException(detailMessage: String?)
Parameters |
detailMessage |
String?: This value may be null . |
Public methods
getErrorContext
fun getErrorContext(): Int
Return |
Int |
an opaque integer that would help the @MediaDrm vendor locate the source of the error if available, otherwise 0. |
getOemError
fun getOemError(): Int
Return |
Int |
an OEM or SOC specific error code if available, otherwise 0. |
getVendorError
fun getVendorError(): Int
Return |
Int |
an error code defined by the MediaDrm plugin vendor if available, otherwise 0. |
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,["# MediaCryptoException\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nMediaCryptoException\n====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/MediaCryptoException \"View this page in Java\") \n\n```\nclass MediaCryptoException : Exception, MediaDrmThrowable\n```\n\n|---|---|---|-----------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||||\n| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) |||\n| | ↳ | [java.lang.Exception](../../java/lang/Exception.html#) ||\n| | | ↳ | [android.media.MediaCryptoException](#) |\n\nException thrown if MediaCrypto object could not be instantiated or if unable to perform an operation on the MediaCrypto object.\n\nSummary\n-------\n\n| Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [MediaCryptoException](#MediaCryptoException(kotlin.String))`(`detailMessage:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`)` \u003cbr /\u003e |\n\n| Public methods ||\n|----------------------------------------------------------------------------|--------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getErrorContext](#getErrorContext())`()` \u003cbr /\u003e |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getOemError](#getOemError())`()` \u003cbr /\u003e |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getVendorError](#getVendorError())`()` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### MediaCryptoException\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nMediaCryptoException(detailMessage: String?)\n```\n\n| Parameters ||\n|-----------------|--------------------------------------------------------------------------------------------------------------|\n| `detailMessage` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?: This value may be `null`. |\n\nPublic methods\n--------------\n\n### getErrorContext\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getErrorContext(): Int\n```\n\n| Return ||\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | an opaque integer that would help the @[MediaDrm](/reference/kotlin/android/media/MediaDrm) vendor locate the source of the error if available, otherwise 0. |\n\n### getOemError\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getOemError(): Int\n```\n\n| Return ||\n|----------------------------------------------------------------------------|--------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | an OEM or SOC specific error code if available, otherwise 0. |\n\n### getVendorError\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getVendorError(): Int\n```\n\n| Return ||\n|----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | an error code defined by the [MediaDrm](/reference/kotlin/android/media/MediaDrm) plugin vendor if available, otherwise 0. |"]]