# Google.Play.AppUpdate.AppUpdateManager

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

## Summary

| ### Constructors and Destructors ||
|---|---|
| `https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateManager#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateManager_1ad8ef9b7e8e4b34ec14a70ea5448e7f6f()` Constructor. ||

| ### Public functions ||
|---|---|
| `https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateManager#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateManager_1a81cb87fc3559463bb4995e3335a4fb10()` | `PlayAsyncOperation< https://developer.android.com/reference/unity/class/Google/Play/Common/VoidResult#classGoogle_1_1Play_1_1Common_1_1VoidResult, https://developer.android.com/reference/unity/namespace/Google/Play/AppUpdate#namespaceGoogle_1_1Play_1_1AppUpdate_1a2efd4be14a91cfac4e689974efaad205 >` Asynchronously requests to complete a flexible in-app update flow that was started via [StartUpdate](https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateManager#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateManager_1a95751a440df6103e82b152bcafc61faf). |
| `https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateManager#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateManager_1aaeb0ae77a66220aea90865a197145a39()` | `PlayAsyncOperation< https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateInfo#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateInfo, https://developer.android.com/reference/unity/namespace/Google/Play/AppUpdate#namespaceGoogle_1_1Play_1_1AppUpdate_1a2efd4be14a91cfac4e689974efaad205 >` Makes a network call to get in-app update information. |
| `https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateManager#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateManager_1a95751a440df6103e82b152bcafc61faf(https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateInfo#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateInfo appUpdateInfo, https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateOptions#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateOptions appUpdateOptions)` | `https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest` Starts an in-app update flow for the specified update type. |

## Public functions

### AppUpdateManager

```c#
 AppUpdateManager()
```
Constructor.

### CompleteUpdate

```c#
PlayAsyncOperation< VoidResult, AppUpdateErrorCode > CompleteUpdate()
```
Asynchronously requests to complete a flexible in-app update flow that was started via [StartUpdate](https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateManager#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateManager_1a95751a440df6103e82b152bcafc61faf).

This should be called after the [AppUpdateRequest](https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest) succeeds. After calling this function the system installer will close the app, perform the update, and then restart the app at the updated version.

<br />

| Details ||
|---|---|
| **Returns** | A PlayAsyncOperation{VoidResult, AppUpdateErrorCode} that returns an [AppUpdateErrorCode](https://developer.android.com/reference/unity/namespace/Google/Play/AppUpdate#namespaceGoogle_1_1Play_1_1AppUpdate_1a2efd4be14a91cfac4e689974efaad205) on failure. If the update succeeds, the app restarts and this callback should never fire. |

### GetAppUpdateInfo

```c#
PlayAsyncOperation< AppUpdateInfo, AppUpdateErrorCode > GetAppUpdateInfo()
```
Makes a network call to get in-app update information.

This must be called before [StartUpdate](https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateManager#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateManager_1a95751a440df6103e82b152bcafc61faf) to obtain an [AppUpdateInfo](https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateInfo#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateInfo), which is needed to start an update.

<br />

| Details ||
|---|---|
| **Returns** | A PlayAsyncOperation{AppUpdateInfo, AppUpdateErrorCode} that returns [AppUpdateInfo](https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateInfo#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateInfo) on successful callback or [AppUpdateErrorCode](https://developer.android.com/reference/unity/namespace/Google/Play/AppUpdate#namespaceGoogle_1_1Play_1_1AppUpdate_1a2efd4be14a91cfac4e689974efaad205) on failure callback. |

### StartUpdate

```c#
AppUpdateRequest StartUpdate(
  AppUpdateInfo appUpdateInfo,
  AppUpdateOptions appUpdateOptions
)
```
Starts an in-app update flow for the specified update type.

Before calling this method use [GetAppUpdateInfo](https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateManager#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateManager_1aaeb0ae77a66220aea90865a197145a39) to get an [AppUpdateInfo](https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateInfo#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateInfo) object.

<br />

Details Parameters `appUpdateInfo` The result of a successful call to [GetAppUpdateInfo](https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateManager#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateManager_1aaeb0ae77a66220aea90865a197145a39). `appUpdateOptions` The type of update flow and additional options. Exceptions `ArgumentNullException` Thrown if any parameter is null. **Returns** An [AppUpdateRequest](https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest) that can be used to monitor the requested in-app update flow.