Added in API level 29

InstallSystemUpdateCallback

abstract class InstallSystemUpdateCallback
kotlin.Any
   ↳ android.app.admin.DevicePolicyManager.InstallSystemUpdateCallback

Callback used in installSystemUpdate to indicate that there was an error while trying to install an update.

Summary

Constants
static Int

Represents the battery being too low to apply an update.

static Int

Represents that the file could not be found.

static Int

Represents the update file being intended for different OS version.

static Int

Represents an unknown error while trying to install an update.

static Int

Represents the update file being wrong; e.

Public constructors

Public methods
open Unit
onInstallUpdateError(errorCode: Int, errorMessage: String)

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

Constants

UPDATE_ERROR_BATTERY_LOW

Added in API level 29
static val UPDATE_ERROR_BATTERY_LOW: Int

Represents the battery being too low to apply an update.

Value: 5

UPDATE_ERROR_FILE_NOT_FOUND

Added in API level 29
static val UPDATE_ERROR_FILE_NOT_FOUND: Int

Represents that the file could not be found.

Value: 4

UPDATE_ERROR_INCORRECT_OS_VERSION

Added in API level 29
static val UPDATE_ERROR_INCORRECT_OS_VERSION: Int

Represents the update file being intended for different OS version.

Value: 2

UPDATE_ERROR_UNKNOWN

Added in API level 29
static val UPDATE_ERROR_UNKNOWN: Int

Represents an unknown error while trying to install an update.

Value: 1

UPDATE_ERROR_UPDATE_FILE_INVALID

Added in API level 29
static val UPDATE_ERROR_UPDATE_FILE_INVALID: Int

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

Value: 3

Public constructors

InstallSystemUpdateCallback

InstallSystemUpdateCallback()

Public methods

onInstallUpdateError

Added in API level 29
open fun onInstallUpdateError(
    errorCode: Int,
    errorMessage: String
): Unit

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.

Parameters
errorCode Int: Value is android.app.admin.DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_UNKNOWN, android.app.admin.DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_INCORRECT_OS_VERSION, android.app.admin.DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_UPDATE_FILE_INVALID, android.app.admin.DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_FILE_NOT_FOUND, or android.app.admin.DevicePolicyManager.InstallSystemUpdateCallback#UPDATE_ERROR_BATTERY_LOW
errorMessage String: This value cannot be null.