Description
The AndroidOSInfo
object provides information about the operating system installed on the given Android device. The object contains the following properties:
Note: | All the properties are read-only. |
Property | Description |
---|---|
Board |
String. The code name of the device's system board. |
Brand |
String. The brand for which the OS is customized. |
BuildType |
String. The type of the given build. |
Display |
String. A string containing the build ID which is visible to the user. |
Host |
String. The HOST property value of the android.os.Build object |
ID |
String. A changelist number or a label. |
Tags |
Comma-separated tags for the given OS build. |
User |
String. The USER property value of the android.os.Build object . |
VersionCodename |
String. The current development codename. If the version is already released, the property returns "REL". |
VersionIncremental |
String. The software version in the form of internal code used by the source code control system. |
VersionRelease |
String. The software version that is visible to the user. |
VersionSDK |
Integer. The version of the Android SDK used in this version of the operating system. |
Example
The following code gets the AndroidOSInfo
object and posts the values of some of its properties to the test log:
JavaScript, JScript
function GetOSInfoObj()
{
var OSInfoObj = Mobile.Device("MyDevice").OSInfo;
Log.Message("Brand: " + OSInfoObj.Brand);
Log.Message("Type of the build: " + OSInfoObj.BuildType);
Log.Message("Release version:" + OSInfoObj.VersionRelease);
}
Python
def GetOSInfoObj():
OSInfoObj = Mobile.Device("MyDevice").OSInfo
Log.Message("Brand: " + OSInfoObj.Brand)
Log.Message("Type of the build: " + OSInfoObj.BuildType)
Log.Message("Release version: " + OSInfoObj.VersionRelease)
VBScript
Sub GetOSInfo
Set OSInfoObj = Mobile.Device("MyDevice").OSInfo
Log.Message("Brand: " & OSInfoObj.Brand)
Log.Message("Type of the build: " & OSInfoObj.BuildType)
Log.Message("Release version: " & OSInfoObj.VersionRelease)
End Sub
DelphiScript
procedure GetOSInfoObj();
var OSInfoObj;
begin
OSInfoObj := Mobile.Device('MyDevice').OSInfo;
Log.Message('Brand: ' + OSInfoObj.Brand);
Log.Message('Type of the build: ' + OSInfoObj.BuildType);
Log.Message('Release version: ' + OSInfoObj.VersionRelease);
end;
C++Script, C#Script
function GetOSInfoObj()
{
var OSInfoObj = Mobile["Device"]("MyDevice")["OSInfo"];
Log["Message"]("Brand: " + OSInfoObj["Brand"]);
Log["Message"]("Type of the build: " + OSInfoObj["BuildType"]);
Log["Message"]("Release version:" + OSInfoObj["VersionRelease"]);
}