Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#constants) \| [Ctors](https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#pubctors) \| [Methods](https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#inhmethods)

# DevicePolicyManager.InstallSystemUpdateCallback

*** ** * ** ***

` public static abstract class DevicePolicyManager.InstallSystemUpdateCallback `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.admin.DevicePolicyManager.InstallSystemUpdateCallback |

<br />

*** ** * ** ***

Callback used in `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#installSystemUpdate(android.content.ComponentName,%20android.net.Uri,%20java.util.concurrent.Executor,%20android.app.admin.DevicePolicyManager.InstallSystemUpdateCallback)` to indicate that there was an error while trying to install an update.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_BATTERY_LOW` Represents the battery being too low to apply an update. |
| `int` | `https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_FILE_NOT_FOUND` Represents that the file could not be found. |
| `int` | `https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_INCORRECT_OS_VERSION` Represents the update file being intended for different OS version. |
| `int` | `https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_UNKNOWN` Represents an unknown error while trying to install an update. |
| `int` | `https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_UPDATE_FILE_INVALID` Represents the update file being wrong; e.g. payloads are mismatched, or the wrong compression method is used. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#InstallSystemUpdateCallback()() ` |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#onInstallUpdateError(int,%20java.lang.String)(int errorCode, https://developer.android.com/reference/java/lang/String errorMessage) ` Method invoked when there was an error while installing an update. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### UPDATE_ERROR_BATTERY_LOW

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UPDATE_ERROR_BATTERY_LOW
```

Represents the battery being too low to apply an update.

<br />

Constant Value: 5 (0x00000005)

### UPDATE_ERROR_FILE_NOT_FOUND

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UPDATE_ERROR_FILE_NOT_FOUND
```

Represents that the file could not be found.

<br />

Constant Value: 4 (0x00000004)

### UPDATE_ERROR_INCORRECT_OS_VERSION

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UPDATE_ERROR_INCORRECT_OS_VERSION
```

Represents the update file being intended for different OS version.

<br />

Constant Value: 2 (0x00000002)

### UPDATE_ERROR_UNKNOWN

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UPDATE_ERROR_UNKNOWN
```

Represents an unknown error while trying to install an update.

<br />

Constant Value: 1 (0x00000001)

### UPDATE_ERROR_UPDATE_FILE_INVALID

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UPDATE_ERROR_UPDATE_FILE_INVALID
```

Represents the update file being wrong; e.g. payloads are mismatched, or the wrong compression method is used.

<br />

Constant Value: 3 (0x00000003)

## Public constructors

### InstallSystemUpdateCallback

```
public InstallSystemUpdateCallback ()
```

<br />

<br />

## Public methods

### onInstallUpdateError

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onInstallUpdateError (int errorCode, 
                String errorMessage)
```

Method invoked when there was an error while installing an update.

The given error message is not intended to be user-facing. It is intended to be reported back to the IT admin to be read.

<br />

| Parameters ||
|---|---|
| `errorCode` | `int`: Value is one of the following: - `https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_UNKNOWN` - `https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_INCORRECT_OS_VERSION` - `https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_UPDATE_FILE_INVALID` - `https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_FILE_NOT_FOUND` - `https://developer.android.com/reference/android/app/admin/DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_BATTERY_LOW` |
| `errorMessage` | `String`: This value cannot be `null`. <br /> |