Google.Play.AppUpdate.AppUpdateManager

Manages operations for requesting and launching an in-app update flow.

Summary

Constructors and Destructors

AppUpdateManager()
Constructor.

Public functions

CompleteUpdate()
PlayAsyncOperation< VoidResult, AppUpdateErrorCode >
Asynchronously requests to complete a flexible in-app update flow that was started via StartUpdate.
GetAppUpdateInfo()
PlayAsyncOperation< AppUpdateInfo, AppUpdateErrorCode >
Makes a network call to get in-app update information.
StartUpdate(AppUpdateInfo appUpdateInfo, AppUpdateOptions appUpdateOptions)
Starts an in-app update flow for the specified update type.

Public functions

AppUpdateManager

 AppUpdateManager()

Constructor.

CompleteUpdate

PlayAsyncOperation< VoidResult, AppUpdateErrorCode > CompleteUpdate()

Asynchronously requests to complete a flexible in-app update flow that was started via StartUpdate.

This should be called after the AppUpdateRequest succeeds. After calling this function the system installer will close the app, perform the update, and then restart the app at the updated version.

Details
Returns
A PlayAsyncOperation{VoidResult, AppUpdateErrorCode} that returns an AppUpdateErrorCode on failure. If the update succeeds, the app restarts and this callback should never fire.

GetAppUpdateInfo

PlayAsyncOperation< AppUpdateInfo, AppUpdateErrorCode > GetAppUpdateInfo()

Makes a network call to get in-app update information.

This must be called before StartUpdate to obtain an AppUpdateInfo, which is needed to start an update.

Details
Returns
A PlayAsyncOperation{AppUpdateInfo, AppUpdateErrorCode} that returns AppUpdateInfo on successful callback or AppUpdateErrorCode on failure callback.

StartUpdate

AppUpdateRequest StartUpdate(
  AppUpdateInfo appUpdateInfo,
  AppUpdateOptions appUpdateOptions
)

Starts an in-app update flow for the specified update type.

Before calling this method use GetAppUpdateInfo to get an AppUpdateInfo object.

Details
Parameters
appUpdateInfo
The result of a successful call to GetAppUpdateInfo.
appUpdateOptions
The type of update flow and additional options.
Exceptions
ArgumentNullException
Thrown if any parameter is null.
Returns
An AppUpdateRequest that can be used to monitor the requested in-app update flow.