Stay organized with collections
Save and categorize content based on your preferences.
OnObbStateChangeListener
abstract class OnObbStateChangeListener
Used for receiving notifications from StorageManager
about OBB file states.
Summary
Constants |
static Int |
The OBB has already been mounted.
|
static Int |
The OBB could not be mounted by the system.
|
static Int |
The OBB could not be unmounted.
|
static Int |
There was an internal system error encountered while trying to mount the OBB.
|
static Int |
A call was made to unmount the OBB when it was not mounted.
|
static Int |
The current application does not have permission to use this OBB.
|
static Int |
The OBB container is now mounted and ready for use.
|
static Int |
The OBB container is now unmounted and not usable.
|
Public methods |
open Unit |
Called when an OBB has changed states.
|
Constants
ERROR_ALREADY_MOUNTED
static val ERROR_ALREADY_MOUNTED: Int
The OBB has already been mounted. Returned in status messages from calls made via StorageManager
Value: 24
ERROR_COULD_NOT_MOUNT
static val ERROR_COULD_NOT_MOUNT: Int
The OBB could not be mounted by the system. Returned in status messages from calls made via StorageManager
Value: 21
ERROR_COULD_NOT_UNMOUNT
static val ERROR_COULD_NOT_UNMOUNT: Int
The OBB could not be unmounted. This most likely indicates that a file is in use on the OBB. Returned in status messages from calls made via StorageManager
Value: 22
ERROR_INTERNAL
static val ERROR_INTERNAL: Int
There was an internal system error encountered while trying to mount the OBB. Returned in status messages from calls made via StorageManager
Value: 20
ERROR_NOT_MOUNTED
static val ERROR_NOT_MOUNTED: Int
A call was made to unmount the OBB when it was not mounted. Returned in status messages from calls made via StorageManager
Value: 23
ERROR_PERMISSION_DENIED
static val ERROR_PERMISSION_DENIED: Int
The current application does not have permission to use this OBB. This could be because the OBB indicates it's owned by a different package or some other error. Returned in status messages from calls made via StorageManager
Value: 25
MOUNTED
static val MOUNTED: Int
The OBB container is now mounted and ready for use. Returned in status messages from calls made via StorageManager
Value: 1
UNMOUNTED
static val UNMOUNTED: Int
The OBB container is now unmounted and not usable. Returned in status messages from calls made via StorageManager
Value: 2
Public constructors
OnObbStateChangeListener
OnObbStateChangeListener()
Public methods
onObbStateChange
open fun onObbStateChange(
path: String!,
state: Int
): Unit
Called when an OBB has changed states.
Parameters |
path |
String!: path to the OBB file the state change has happened on |
state |
Int: the current state of the OBB |
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,["# OnObbStateChangeListener\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnObbStateChangeListener\n========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/os/storage/OnObbStateChangeListener \"View this page in Java\") \n\n```\nabstract class OnObbStateChangeListener\n```\n\n|---|--------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.os.storage.OnObbStateChangeListener](#) |\n\nUsed for receiving notifications from [StorageManager](/reference/kotlin/android/os/storage/StorageManager) about OBB file states.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_ALREADY_MOUNTED](#ERROR_ALREADY_MOUNTED:kotlin.Int) The OBB has already been mounted. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_COULD_NOT_MOUNT](#ERROR_COULD_NOT_MOUNT:kotlin.Int) The OBB could not be mounted by the system. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_COULD_NOT_UNMOUNT](#ERROR_COULD_NOT_UNMOUNT:kotlin.Int) The OBB could not be unmounted. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_INTERNAL](#ERROR_INTERNAL:kotlin.Int) There was an internal system error encountered while trying to mount the OBB. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_NOT_MOUNTED](#ERROR_NOT_MOUNTED:kotlin.Int) A call was made to unmount the OBB when it was not mounted. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_PERMISSION_DENIED](#ERROR_PERMISSION_DENIED:kotlin.Int) The current application does not have permission to use this OBB. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [MOUNTED](#MOUNTED:kotlin.Int) The OBB container is now mounted and ready for use. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [UNMOUNTED](#UNMOUNTED:kotlin.Int) The OBB container is now unmounted and not usable. |\n\n| Public constructors ||\n|--------------------------------------------------------------------|---|\n| [OnObbStateChangeListener](#OnObbStateChangeListener())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onObbStateChange](#onObbStateChange(kotlin.String,%20kotlin.Int))`(`path:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `state:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Called when an OBB has changed states. |\n\nConstants\n---------\n\n### ERROR_ALREADY_MOUNTED\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_ALREADY_MOUNTED: Int\n```\n\nThe OBB has already been mounted. Returned in status messages from calls made via [StorageManager](/reference/kotlin/android/os/storage/StorageManager) \n\n Value: 24\n\n### ERROR_COULD_NOT_MOUNT\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_COULD_NOT_MOUNT: Int\n```\n\nThe OBB could not be mounted by the system. Returned in status messages from calls made via [StorageManager](/reference/kotlin/android/os/storage/StorageManager) \n\n Value: 21\n\n### ERROR_COULD_NOT_UNMOUNT\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_COULD_NOT_UNMOUNT: Int\n```\n\nThe OBB could not be unmounted. This most likely indicates that a file is in use on the OBB. Returned in status messages from calls made via [StorageManager](/reference/kotlin/android/os/storage/StorageManager) \n\n Value: 22\n\n### ERROR_INTERNAL\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_INTERNAL: Int\n```\n\nThere was an internal system error encountered while trying to mount the OBB. Returned in status messages from calls made via [StorageManager](/reference/kotlin/android/os/storage/StorageManager) \n\n Value: 20\n\n### ERROR_NOT_MOUNTED\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_NOT_MOUNTED: Int\n```\n\nA call was made to unmount the OBB when it was not mounted. Returned in status messages from calls made via [StorageManager](/reference/kotlin/android/os/storage/StorageManager) \n\n Value: 23\n\n### ERROR_PERMISSION_DENIED\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_PERMISSION_DENIED: Int\n```\n\nThe current application does not have permission to use this OBB. This could be because the OBB indicates it's owned by a different package or some other error. Returned in status messages from calls made via [StorageManager](/reference/kotlin/android/os/storage/StorageManager) \n\n Value: 25\n\n### MOUNTED\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val MOUNTED: Int\n```\n\nThe OBB container is now mounted and ready for use. Returned in status messages from calls made via [StorageManager](/reference/kotlin/android/os/storage/StorageManager) \n\n Value: 1\n\n### UNMOUNTED\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val UNMOUNTED: Int\n```\n\nThe OBB container is now unmounted and not usable. Returned in status messages from calls made via [StorageManager](/reference/kotlin/android/os/storage/StorageManager) \n\n Value: 2\n\nPublic constructors\n-------------------\n\n### OnObbStateChangeListener\n\n```\nOnObbStateChangeListener()\n```\n\nPublic methods\n--------------\n\n### onObbStateChange\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onObbStateChange(\n path: String!, \n state: Int\n): Unit\n```\n\nCalled when an OBB has changed states.\n\n| Parameters ||\n|---------|------------------------------------------------------------------------------------------------------------------------------------------|\n| `path` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: path to the OBB file the state change has happened on |\n| `state` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the current state of the OBB |"]]