# AppUpdateResult.Available

# Available

```
class Available : AppUpdateResult
```

|---|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                       |||
| ↳ | [com.google.android.play.core.ktx.AppUpdateResult](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult)                         ||
|   | ↳ | [com.google.android.play.core.ktx.AppUpdateResult.Available](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#) |

Emitted when there is an update available or in progress.

You can access the update details in the[updateInfo](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo)object. If[AppUpdateInfo.updateAvailability](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateInfo.html#updateAvailability())is[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 the immediate update flow, you should call[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.

## Summary

|                                                                                                                                                                                                                                                                                   ### Public constructors                                                                                                                                                                                                                                                                                   ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [<init>](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#%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. |

|                                                                                                                                                                                                                                                                                                                      ### Public methods                                                                                                                                                                                                                                                                                                                       ||
|------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [startFlexibleUpdate](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#startFlexibleUpdate(,%20kotlin.Int))`(`activity:` `<ERROR CLASS>`, `requestCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Convenience function for starting the update flow using the current[updateInfo](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo).                            |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [startFlexibleUpdate](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#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](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo).   |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [startImmediateUpdate](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#startImmediateUpdate(,%20kotlin.Int))`(`activity:` `<ERROR CLASS>`, `requestCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Convenience function for starting the update flow using the current[updateInfo](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo).                          |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [startImmediateUpdate](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#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](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo). |

|                                                                                                                                               ### Properties                                                                                                                                                ||
|--------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AppUpdateInfo](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateInfo.html) | [updateInfo](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo) <br /> |

## Public constructors

### \<init\>

```
Available(
    appUpdateManager: AppUpdateManager, 
    updateInfo: AppUpdateInfo)
```

Emitted when there is an update available or in progress.

You can access the update details in the[updateInfo](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo)object. If[AppUpdateInfo.updateAvailability](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateInfo.html#updateAvailability())is[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 the immediate update flow, you should call[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.  
**See Also**

- `
  `[requestUpdateFlow](https://developer.android.com/reference/com/google/android/play/core/ktx/package-summary#(com.google.android.play.core.appupdate.AppUpdateManager).requestUpdateFlow())
  `
  `

## Public methods

### startFlexibleUpdate

```
fun startFlexibleUpdate(
    activity: <ERROR CLASS>, 
    requestCode: Int
): Boolean
```

Convenience function for starting the update flow using the current[updateInfo](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo).  
**See Also**

- `
  `[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))
  `
`  

### startFlexibleUpdate

```
fun startFlexibleUpdate(
    fragment: Fragment, 
    requestCode: Int
): Boolean
```

Convenience function for starting the update flow using the current[updateInfo](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo).  
**See Also**

- `
  `[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))
  `
`  

### startImmediateUpdate

```
fun startImmediateUpdate(
    activity: <ERROR CLASS>, 
    requestCode: Int
): Boolean
```

Convenience function for starting the update flow using the current[updateInfo](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo).  
**See Also**

- `
  `[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))
  `
`  

### startImmediateUpdate

```
fun startImmediateUpdate(
    fragment: Fragment, 
    requestCode: Int
): Boolean
```

Convenience function for starting the update flow using the current[updateInfo](https://developer.android.com/reference/com/google/android/play/core/ktx/AppUpdateResult.Available#updateInfo:com.google.android.play.core.appupdate.AppUpdateInfo).  
**See Also**

- `
  `[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))
  `
  `

## Properties

### updateInfo

```
val updateInfo: AppUpdateInfo
```