This namespace provides access to the Android OS functionality.
- Since:
- Version 1.0 (API level 1)
Classes
Members
-
static, readonly apiLevel :number
-
Android API level. For example: 26 for Oreo.
- Since:
- Version 1.0 (API level 1)
Example
if (mobicontrol.os.apiLevel >= 26) { mobicontrol.log.info("Running on Oreo or higher."); }
-
static, readonly buildNumber :string
-
Android build number. For example: RQ3A.210905.001 is a build number for Android 11.
- Since:
- Version 1.4 (API level 5)
Example
var affectedBuildNumbers = ["RQ3A.210905.001", "RD2A.210905.002", "RD2A.210905.003"]; if (affectedBuildNumbers.includes(mobicontrol.os.buildNumber)) { mobicontrol.log.info("Please install the latest system update"); }
-
static, readonly SystemUpdateErrorStatusCode :object
-
This enumeration represents an error status code of mobicontrol.os.SystemUpdateError.
Properties:
Name Type Description UNKNOWN
object The exact error could not be determined. NOT_SUPPORTED
object Install system update is not supported. BATTERY_LOW
object The battery is too low to apply an update. FILE_NOT_FOUND
object The update file doesn't exist. FILE_INVALID
object The update file is wrong; e.g. payloads are mismatched, or the wrong compression method is used. INCORRECT_OS_VERSION
object The update file is intended for different OS version. - Since:
- Version 1.4 (API level 5)
-
static, readonly version :string
-
Android version. For example: "8.0.0" for Oreo.
- Since:
- Version 1.0 (API level 1)
Methods
-
static installSystemUpdate(systemUpdateFile)
-
Install operating system update.
Parameters:
Name Type Description systemUpdateFile
mobicontrol.io.File The file that contains the update. Throws:
- Since:
- Version 1.4 (API level 5)