Stay organized with collections
Save and categorize content based on your preferences.
Available
class Available : AppUpdateResult
Emitted when there is an update available or in progress.
You can access the update details in the updateInfo object.
If AppUpdateInfo.updateAvailability is
UpdateAvailability.DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS and you require
the immediate update flow, you should call
AppUpdateManager.startUpdateFlowForResult to show the UI.
Summary
Public constructors
|
Emitted when there is an update available or in progress.
|
Public methods
|
Boolean |
Convenience function for starting the update flow using the current updateInfo.
|
Boolean |
Convenience function for starting the update flow using the current updateInfo.
|
Boolean |
Convenience function for starting the update flow using the current updateInfo.
|
Boolean |
Convenience function for starting the update flow using the current updateInfo.
|
Public constructors
Public methods
startFlexibleUpdate
fun startFlexibleUpdate(
activity: <ERROR CLASS>,
requestCode: Int
): Boolean
Convenience function for starting the update flow using the current updateInfo.
startFlexibleUpdate
fun startFlexibleUpdate(
fragment: Fragment,
requestCode: Int
): Boolean
Convenience function for starting the update flow using the current updateInfo.
fun startImmediateUpdate(
activity: <ERROR CLASS>,
requestCode: Int
): Boolean
Convenience function for starting the update flow using the current updateInfo.
fun startImmediateUpdate(
fragment: Fragment,
requestCode: Int
): Boolean
Convenience function for starting the update flow using the current updateInfo.
Properties
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# AppUpdateResult.Available\n\nAvailable\n=========\n\n```\nclass Available : AppUpdateResult\n```\n\n|---|---|-----------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [com.google.android.play.core.ktx.AppUpdateResult](/reference/com/google/android/play/core/ktx/AppUpdateResult) ||\n| | ↳ | [com.google.android.play.core.ktx.AppUpdateResult.Available](#) |\n\nEmitted when there is an update available or in progress.\n\nYou can access the update details in the [updateInfo](#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo) object.\nIf [AppUpdateInfo.updateAvailability](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateInfo.html#updateAvailability()) is\n[UpdateAvailability.DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS](https://developer.android.com/reference/com/google/android/play/core/install/model/UpdateAvailability.html#DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS) and you require\nthe immediate update flow, you should call\n[AppUpdateManager.startUpdateFlowForResult](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateManager.html#startUpdateFlowForResult(com.google.android.play.core.appupdate.AppUpdateInfo, int, android.app.Activity, int)) to show the UI.\n\nSummary\n-------\n\n| ### Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [\u003cinit\u003e](#%3Cinit%3E(com.google.android.play.core.appupdate.AppUpdateManager,%20com.google.android.play.core.appupdate.AppUpdateInfo))`(`appUpdateManager:` `[AppUpdateManager](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateManager.html)`, `updateInfo:` `[AppUpdateInfo](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateInfo.html)`)` Emitted when there is an update available or in progress. |\n\n| ### Public methods ||\n|------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [startFlexibleUpdate](#startFlexibleUpdate(,%20kotlin.Int))`(`activity:` `\u003cERROR CLASS\u003e`, `requestCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Convenience function for starting the update flow using the current [updateInfo](#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo). |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [startFlexibleUpdate](#startFlexibleUpdate(androidx.fragment.app.Fragment,%20kotlin.Int))`(`fragment:` `Fragment`, `requestCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Convenience function for starting the update flow using the current [updateInfo](#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo). |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [startImmediateUpdate](#startImmediateUpdate(,%20kotlin.Int))`(`activity:` `\u003cERROR CLASS\u003e`, `requestCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Convenience function for starting the update flow using the current [updateInfo](#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo). |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [startImmediateUpdate](#startImmediateUpdate(androidx.fragment.app.Fragment,%20kotlin.Int))`(`fragment:` `Fragment`, `requestCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Convenience function for starting the update flow using the current [updateInfo](#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo). |\n\n| ### Properties ||\n|--------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|\n| [AppUpdateInfo](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateInfo.html) | [updateInfo](#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo) \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### \\\u003cinit\\\u003e\n\n```\nAvailable(\n appUpdateManager: AppUpdateManager, \n updateInfo: AppUpdateInfo)\n```\n\nEmitted when there is an update available or in progress.\n\nYou can access the update details in the [updateInfo](#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo) object.\nIf [AppUpdateInfo.updateAvailability](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateInfo.html#updateAvailability()) is\n[UpdateAvailability.DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS](https://developer.android.com/reference/com/google/android/play/core/install/model/UpdateAvailability.html#DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS) and you require\nthe immediate update flow, you should call\n[AppUpdateManager.startUpdateFlowForResult](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateManager.html#startUpdateFlowForResult(com.google.android.play.core.appupdate.AppUpdateInfo, int, android.app.Activity, int)) to show the UI. \n**See Also**\n\n- `\n `[requestUpdateFlow](/reference/com/google/android/play/core/ktx/package-summary#(com.google.android.play.core.appupdate.AppUpdateManager).requestUpdateFlow())\n `\n `\n\nPublic methods\n--------------\n\n### startFlexibleUpdate\n\n```\nfun startFlexibleUpdate(\n activity: \u003cERROR CLASS\u003e, \n requestCode: Int\n): Boolean\n```\n\nConvenience function for starting the update flow using the current [updateInfo](#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo). \n**See Also**\n\n- `\n `[AppUpdateManager.startUpdateFlowForResult](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateManager.html#startUpdateFlowForResult(com.google.android.play.core.appupdate.AppUpdateInfo, int, android.app.Activity, int))\n `\n` \n\n### startFlexibleUpdate\n\n```\nfun startFlexibleUpdate(\n fragment: Fragment, \n requestCode: Int\n): Boolean\n```\n\nConvenience function for starting the update flow using the current [updateInfo](#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo). \n**See Also**\n\n- `\n `[AppUpdateManager.startUpdateFlowForResult](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateManager.html#startUpdateFlowForResult(com.google.android.play.core.appupdate.AppUpdateInfo, int, android.app.Activity, int))\n `\n` \n\n### startImmediateUpdate\n\n```\nfun startImmediateUpdate(\n activity: \u003cERROR CLASS\u003e, \n requestCode: Int\n): Boolean\n```\n\nConvenience function for starting the update flow using the current [updateInfo](#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo). \n**See Also**\n\n- `\n `[AppUpdateManager.startUpdateFlowForResult](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateManager.html#startUpdateFlowForResult(com.google.android.play.core.appupdate.AppUpdateInfo, int, android.app.Activity, int))\n `\n` \n\n### startImmediateUpdate\n\n```\nfun startImmediateUpdate(\n fragment: Fragment, \n requestCode: Int\n): Boolean\n```\n\nConvenience function for starting the update flow using the current [updateInfo](#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo). \n**See Also**\n\n- `\n `[AppUpdateManager.startUpdateFlowForResult](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateManager.html#startUpdateFlowForResult(com.google.android.play.core.appupdate.AppUpdateInfo, int, android.app.Activity, int))\n `\n `\n\nProperties\n----------\n\n### updateInfo\n\n```\nval updateInfo: AppUpdateInfo\n```"]]