Samsung Electronics logo

Samsung Web API: SystemInfo


Introduction

This specification defines interfaces and methods that provide web applications with access to various properties of a system.

This API also provides interfaces and methods that can retrieve statuses of hardware devices, get the value of selected properties, and subscribe to asynchronous notifications of changes for selected values.

The following provides an overview of the tree data structure:

  • BATTERY
  • CPU
  • STORAGE
  • DISPLAY
  • DEVICE_ORIENTATION
  • BUILD
  • LOCALE
  • NETWORK
  • WIFI_NETWORK
  • CELLULAR_NETWORK
  • ETHERNET_NETWORK
  • SIM
  • PERIPHERAL
  • VIDEOSOURCE

For more information on the SystemInfo features, see SystemInfo Guide.


Table of Contents


Summary of Interfaces and Methods

Interface Method
SystemInfoObject
SystemInfo SystemInfoDeviceCapability getCapabilities()
void getPropertyValue(SystemInfoPropertyId property, SystemInfoPropertySuccessCallback successCallback, ErrorCallback? errorCallback)
unsigned long addPropertyValueChangeListener(SystemInfoPropertyId property, SystemInfoPropertySuccessCallback successCallback, SystemInfoOptions? options)
void removePropertyValueChangeListener(unsigned long listenerId)
SystemInfoDeviceCapability
SystemInfoOptions
SystemInfoPropertySuccessCallback void onsuccess(SystemInfoProperty prop)
SystemInfoProperty
SystemInfoBattery
SystemInfoCpu
SystemInfoStorage
SystemInfoStorageUnit
SystemInfoDisplay
SystemInfoDeviceOrientation
SystemInfoBuild
SystemInfoLocale
SystemInfoNetwork
SystemInfoWifiNetwork
SystemInfoCellularNetwork
SystemInfoEthernetNetwork
SystemInfoSIM
SystemInfoPeripheral
SystemInfoVideoSourceInfo
SystemInfoVideoSource

1. Type Definitions

1.1. SystemInfoPropertyId

The device property identifier.

  enum SystemInfoPropertyId { "BATTERY" , "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK", "CELLULAR_NETWORK", "ETHERNET_NETWORK", "SIM", "PERIPHERAL", "VIDEOSOURCE" };

1.2. SystemInfoNetworkType

Data Network Type.

  enum SystemInfoNetworkType { "NONE", "2G", "2.5G", "3G", "4G", "WIFI", "ETHERNET", "UNKNOWN" };

1.3. SystemInfoDeviceOrientationStatus

Device Orientation Status.

  enum SystemInfoDeviceOrientationStatus { "PORTRAIT_PRIMARY", "PORTRAIT_SECONDARY", "LANDSCAPE_PRIMARY", "LANDSCAPE_SECONDARY" };

1.4. SystemInfoSimState

Sim State.

  enum SystemInfoSimState { "ABSENT", "INITIALIZING", "READY", "PIN_REQUIRED", "PUK_REQUIRED", "NETWORK_LOCKED", "SIM_LOCKED", "UNKNOWN" };

1.5. SystemInfoProfile

Device Profile.

  enum SystemInfoProfile { "MOBILE_FULL", "MOBILE_WEB" };

1.6. SystemInfoVideoSourceType

An enumerator to indicate the type of video source

  enum SystemInfoVideoSourceType { "TV", "AV", "SVIDEO", "COMP", "PC", "HDMI", "SCART", "DVI" };
  • TV - The input source from TV
  • AV - The input source from Component video, three cables, each with RCA plugs (3 or more channels)
  • SVIDEO - S-Video(Super-Video) and Y/C (2 channels)
  • COMP - The input source from Composite video (1 channel)
  • PC - The input source from personal computer (15-pin VGA connector)
  • HDMI - The input source from HDMI(High-Definition Multimedia Interface)
  • SCART - The input source from SCART(21-pin connector)
  • DVI - The input source from DVI(Digital Visual Interface)

2. Interfaces

2.1. SystemInfoObject

Defines what is instantiated the webapis object.

  [NoInterfaceObject] interface SystemInfoObject {
    readonly attribute SystemInfo systeminfo;
  };
  WebAPIs implements SystemInfoObject;

There will be a webapis.systeminfo object that allows accessing the functionality of the SystemInfo API.

2.2. SystemInfo

This entry interface queries the information of a system.

  [NoInterfaceObject] interface SystemInfo {

    SystemInfoDeviceCapability getCapabilities() raises(WebAPIException);

    void getPropertyValue(SystemInfoPropertyId property,
                          SystemInfoPropertySuccessCallback successCallback,
                          optional ErrorCallback? errorCallback) raises(WebAPIException);

    unsigned long addPropertyValueChangeListener(SystemInfoPropertyId property,
                                        SystemInfoPropertySuccessCallback successCallback,
                                        optional SystemInfoOptions? options) raises(WebAPIException);

    void removePropertyValueChangeListener(unsigned long listenerId) raises(WebAPIException);
  };

This API offers methods for retrieving system information and for subscribing notifications of system information changes.

METHODS

getCapabilities

Gets the capabilities of the device.

Signature
SystemInfoDeviceCapability getCapabilities();

The function must synchronously acquire the capabilities of the device.

Exceptions
  • WebAPIException:

    with error type UnknownError in any other error case.

    with error type SecurityError, if this functionality is not allowed.

    with error type NotSupportedError, if this feature is not supported.

Code example
 var deviceCapabilities;
 deviceCapabilities = webapis.systeminfo.getCapabilities();
 if (deviceCapabilities.bluetooth)
 {
     console.log("Bluetooth is supported");
 }
 

getPropertyValue

Retrieves the current state of a given system property.

Signature
void getPropertyValue(SystemInfoPropertyId property, SystemInfoPropertySuccessCallback successCallback, optional ErrorCallback? errorCallback);

The function must asynchronously acquire the current value of the requested property. If it is successful, the successCallback must be invoked with an object containing the information provided by the property.

The errorCallback() can be launched with any of these error types:

  • NotFoundError - If the property is not recognized.
  • UnknownError - If any other error occurs.
Parameters
  • property
    • Optional: No.
    • Nullable: No.
    • Type: SystemInfoPropertyId.
    • Description: The name of the property to retrieve.
  • successCallback
    • Optional: No.
    • Nullable: No.
    • Type: SystemInfoPropertySuccessCallback.
    • Description: Function called when the properties have been successfully retrieved.
  • errorCallback
    • Optional: Yes.
    • Nullable: Yes.
    • Type: ErrorCallback.
    • Description: Function called when an error occurred while retrieving the properties.
Exceptions
  • WebAPIException:

    with error type UnknownError in any other error case.

    with error type SecurityError, if this functionality is not allowed.

    with error type NotSupportedError, if this feature is not supported.

    with error type TypeMismatchError, if the input parameter is not compatible with the expected type.

Code example
 function onSuccessCallback(battery) {
     console.log("The battery level is " + battery.level);
 }

 function onErrorCallback(error) {
     console.log("An error occurred " + error.message);
 }

 webapis.systeminfo.getPropertyValue("BATTERY", onSuccessCallback, onErrorCallback);
 

addPropertyValueChangeListener

Adds a listener to allow tracking of changes in one or more system properties.

Signature
unsigned long addPropertyValueChangeListener(SystemInfoPropertyId property, SystemInfoPropertySuccessCallback successCallback, optional SystemInfoOptions? options);

When called, it immediately returns and then asynchronously starts a watch process defined by the following steps:

1. Acquire the system's current values for the property requested. If successful, it invokes the associated successCallback, passing the resulting property value. The type of the passed object is indicated by the property's value type in the definitions below. For example, when BATTERY is passed for SystemInfoPropertyId, SystemInfoBattery object is returned.

2. Register the successCallback to receive system events that the status of the requested properties may have changed.

3. When a system event is successfully received invoke the associated successCallback with an object containing the property values.

4. Repeat step 3 until removePropertyValueChangeListener function is called.

If property value is 'BUILD', listener would not be registered because 'BUILD' property's value is a fixed value.

Parameters
  • property
    • Optional: No.
    • Nullable: No.
    • Type: SystemInfoPropertyId.
    • Description: The name of the property to retrieve.
  • successCallback
    • Optional: No.
    • Nullable: No.
    • Type: SystemInfoPropertySuccessCallback.
    • Description: Function called when the properties have been successfully retrieved.
  • options
    • Optional: Yes.
    • Nullable: Yes.
    • Type: SystemInfoOptions.
    • Description: An object containing the various options for fetching the properties requested.
Return value
unsigned long An identifier used to clear the watch subscription.
Exceptions
  • WebAPIException:

    with error type UnknownError in any other error case.

    with error type SecurityError, if this functionality is not allowed.

    with error type InvalidValuesError, if any of the input parameters contain an invalid value.

    with error type NotSupportedError, if this feature is not supported.

    with error type TypeMismatchError, if the input parameter is not compatible with the expected type.

Code example
 function onSuccessCallback(battery) {
     console.log("Low battery:  " + battery.level);
 }


 webapis.systeminfo.addPropertyValueChangeListener("BATTERY", onSuccessCallback, {lowThreshold : 0.2});
 

removePropertyValueChangeListener

Unsubscribes notifications for property changes set up by addPropertyValueChangeListener.

Signature
void removePropertyValueChangeListener(unsigned long listenerId);

If a valid listenerId argument is passed that corresponds to a subscription already place, then the watch process MUST immediately terminate and no further callback is invoked. If the listenerId argument does not correspond to a valid subscription, the method should return without any further action.

Parameters
  • listenerId
    • Optional: No.
    • Nullable: No.
    • Type: unsigned long.
    • Description: An identifier of the subscription returned by the addPropertyValueChangeListener() method.
Exceptions
  • WebAPIException:

    with error type UnknownError in any other error case.

    with error type SecurityError, if this functionality is not allowed.

    with error type InvalidValuesError, if any of the input parameters contain an invalid value.

    with error type NotSupportedError, if this feature is not supported.

    with error type TypeMismatchError, if the input parameter is not compatible with the expected type.

Code example
 var id = null;
 function onSuccessCallback(battery) {
    console.log("New value for Battery level is " + battery.level);
    if (id != null) // After receiving the first notification, we clear it
        webapis.systeminfo.removePropertyValueChangeListener(id);
 }

 id = webapis.systeminfo.addPropertyValueChangeListener("BATTERY", onSuccessCallback);
 

2.3. SystemInfoDeviceCapability

SystemInfoDeviceCapability object.

  [NoInterfaceObject] interface SystemInfoDeviceCapability {
    readonly attribute boolean bluetooth;

    readonly attribute boolean nfc;

    readonly attribute boolean nfcReservedPush ;

    readonly attribute unsigned short multiTouchCount;

    readonly attribute boolean inputKeyboard;

    readonly attribute boolean inputKeyboardLayout;

    readonly attribute boolean wifi;

    readonly attribute boolean wifiDirect;

    readonly attribute boolean opengles;

    readonly attribute DOMString openglestextureFormat;

    readonly attribute boolean openglesVersion1_1;

    readonly attribute boolean openglesVersion2_0;

    readonly attribute boolean fmRadio;

    readonly attribute DOMString platformVersion;

    readonly attribute DOMString webApiVersion;

    readonly attribute DOMString nativeApiVersion;

    readonly attribute DOMString platformName;

    readonly attribute boolean camera;

    readonly attribute boolean cameraFront;

    readonly attribute boolean cameraFrontFlash;

    readonly attribute boolean cameraBack;

    readonly attribute boolean cameraBackFlash;

    readonly attribute boolean location;

    readonly attribute boolean locationGps;

    readonly attribute boolean locationWps;

    readonly attribute boolean microphone;

    readonly attribute boolean usbHost;

    readonly attribute boolean usbAccessory;

    readonly attribute boolean screenOutputRca;

    readonly attribute boolean screenOutputHdmi;

    readonly attribute DOMString platformCoreCpuArch;

    readonly attribute DOMString platformCoreFpuArch;

    readonly attribute boolean sipVoip;

    readonly attribute DOMString duid;

    readonly attribute boolean speechRecognition;

    readonly attribute boolean speechSynthesis;

    readonly attribute boolean accelerometer;

    readonly attribute boolean accelerometerWakeup;

    readonly attribute boolean barometer;

    readonly attribute boolean barometerWakeup;

    readonly attribute boolean gyroscope;

    readonly attribute boolean gyroscopeWakeup;

    readonly attribute boolean magnetometer;

    readonly attribute boolean magnetometerWakeup;

    readonly attribute boolean photometer;

    readonly attribute boolean photometerWakeup;

    readonly attribute boolean proximity;

    readonly attribute boolean proximityWakeup;

    readonly attribute boolean tiltmeter;

    readonly attribute boolean tiltmeterWakeup;

    readonly attribute boolean dataEncryption;

    readonly attribute boolean graphicsAcceleration;

    readonly attribute boolean push;

    readonly attribute boolean telephony;

    readonly attribute boolean telephonyMms;

    readonly attribute boolean telephonySms;

    readonly attribute boolean screenSizeNormal;

    readonly attribute boolean screenSize480_800;

    readonly attribute boolean screenSize720_1280;

    readonly attribute boolean autoRotation;

    readonly attribute boolean shellAppWidget;

    readonly attribute boolean visionImageRecognition;

    readonly attribute boolean visionQrcodeGeneration;

    readonly attribute boolean visionQrcodeRecognition;

    readonly attribute boolean visionFaceRecognition;

    readonly attribute boolean secureElement;

    readonly attribute boolean nativeOspCompatible;

    readonly attribute SystemInfoProfile profile;
  };

ATTRIBUTES

readonly boolean bluetooth

Indicates whether the device supports Bluetooth.

This attribute is read-only.

readonly boolean nfc

Indicates whether the device supports NFC.

This attribute is read-only.

readonly boolean nfcReservedPush

Indicates whether the device supports NFC reserved push.

This attribute is read-only.

readonly unsigned short multiTouchCount

The number of point in Multi-point touch.

This attribute is read-only.

readonly boolean inputKeyboard

Indicates whether the device supports the built-in Keyboard.

This attribute is read-only.

readonly boolean inputKeyboardLayout

Indicates whether the device supports the built-in keyboard layout.

This attribute is read-only.

readonly boolean wifi

Indicates whether the device supports Wi-Fi.

This attribute is read-only.

readonly boolean wifiDirect

Indicates whether the device supports Wi-Fi direct.

This attribute is read-only.

readonly boolean opengles

Indicates whether the device supports OpenGL-ES.

This attribute is read-only.

readonly DOMString openglestextureFormat

The device 3DC texture format for OpenGL-ES. One example of possible output is as follows: "3dc/atc/etc/ptc/pvrtc/utc"

This attribute is read-only.

readonly boolean openglesVersion1_1

Indicates whether the device supports OpenGL-ES version 1.1.

This attribute is read-only.

readonly boolean openglesVersion2_0

Indicates whether the device supports OpenGL-ES version 2.0.

This attribute is read-only.

readonly boolean fmRadio

Indicates whether the device supports FM radio.

This attribute is read-only.

readonly DOMString platformVersion

The version of the platform in the [Major].[Minor].[Patch Version] format.
For example, 1.0.0 represents a platform version where the major version is 1 and the minor and build versions are 0.

This attribute is read-only.

readonly DOMString webApiVersion

The version of the Web API in the [Major].[Minor] format.
For example, 1.0 represents a web api version where the major version is 1 and the minor version is 0.

This attribute is read-only.

readonly DOMString nativeApiVersion

The version of the native API in the [Major].[Minor] format.
For example, 1.0 represents a native api version where the major version is 1 and the minor version is 0.

This attribute is read-only.

readonly DOMString platformName

The name of the platform.

This attribute is read-only.

readonly boolean camera

Indicates whether the device supports camera.

This attribute is read-only.

readonly boolean cameraFront

Indicates whether the device supports front camera.

This attribute is read-only.

readonly boolean cameraFrontFlash

Indicates whether the device supports flash on the front camera.

This attribute is read-only.

readonly boolean cameraBack

Indicates whether the device supports back-side camera.

This attribute is read-only.

readonly boolean cameraBackFlash

Indicates whether the device supports flash on the back-side camera.

This attribute is read-only.

readonly boolean location

Indicates whether the device supports GPS or not.

This attribute is read-only.

readonly boolean locationGps

Indicates whether the device supports GPS based location feature.

This attribute is read-only.

readonly boolean locationWps

Indicates whether the device supports WPS based location feature.

This attribute is read-only.

readonly boolean microphone

Indicates whether the device supports microphone.

This attribute is read-only.

readonly boolean usbHost

Indicates whether the device supports USB host.

This attribute is read-only.

readonly boolean usbAccessory

Indicates whether the device supports USB accessory.

This attribute is read-only.

readonly boolean screenOutputRca

Indicates whether the device supports RCA output.

This attribute is read-only.

readonly boolean screenOutputHdmi

Indicates whether the device supports HDMI output.

This attribute is read-only.

readonly DOMString platformCoreCpuArch

The device CPU architecture. The possible values for this attribute are: armv6, armv7, x86.

This attribute is read-only.

readonly DOMString platformCoreFpuArch

The device FPU architecture. The possible values for this attribute are: vfpv3 / sse2 / sse3 / ssse3.

This attribute is read-only.

readonly boolean sipVoip

Indicates whether the device supports VOIP.

This attribute is read-only.

readonly DOMString duid

The device unique ID.

This attribute is read-only.

readonly boolean speechRecognition

Indicates whether the device supports speech recognition.

This attribute is read-only.

readonly boolean speechSynthesis

Indicates whether the device supports speech synthesis.

This attribute is read-only.

readonly boolean accelerometer

Indicates whether the device supports Accelerometer sensor.

This attribute is read-only.

readonly boolean accelerometerWakeup

Indicates whether the device supports Accelerometer sensor wake-up feature.

This attribute is read-only.

readonly boolean barometer

Indicates whether the device supports Barometer sensor.

This attribute is read-only.

readonly boolean barometerWakeup

Indicates whether the device supports Barometer sensor wake-up feature.

This attribute is read-only.

readonly boolean gyroscope

Indicates whether the device supports Gyroscope sensor.

This attribute is read-only.

readonly boolean gyroscopeWakeup

Indicates whether the device supports Gyroscope sensor wake-up feature.

This attribute is read-only.

readonly boolean magnetometer

Indicates whether the device supports Magnetometer sensor.

This attribute is read-only.

readonly boolean magnetometerWakeup

Indicates whether the device supports Magnetometer sensor wake-up feature.

This attribute is read-only.

readonly boolean photometer

Indicates whether the device supports Photometer sensor.

This attribute is read-only.

readonly boolean photometerWakeup

Indicates whether the device supports Photometer sensor wake-up feature.

This attribute is read-only.

readonly boolean proximity

Indicates whether the device supports Proximity sensor.

This attribute is read-only.

readonly boolean proximityWakeup

Indicates whether the device supports Proximity sensor wake-up feature.

This attribute is read-only.

readonly boolean tiltmeter

Indicates whether the device supports Tiltmeter sensor.

This attribute is read-only.

readonly boolean tiltmeterWakeup

Indicates whether the device supports Tiltmeter sensor wake-up feature.

This attribute is read-only.

readonly boolean dataEncryption

Indicates whether the device supports data encryption.

This attribute is read-only.

readonly boolean graphicsAcceleration

Indicates whether the device supports hardware acceleration for 2D/3D graphics.

This attribute is read-only.

readonly boolean push

Indicates whether the device supports push service.

This attribute is read-only.

readonly boolean telephony

Indicates whether the device supports the telephony feature.

This attribute is read-only.

readonly boolean telephonyMms

Indicates whether the device supports the mms feature.

This attribute is read-only.

readonly boolean telephonySms

Indicates whether the device supports the sms feature.

This attribute is read-only.

readonly boolean screenSizeNormal

Indicates whether the device supports the screen normal size.

This attribute is read-only.

readonly boolean screenSize480_800

Indicates whether the device supports the 480 * 800 screen size.

This attribute is read-only.

readonly boolean screenSize720_1280

Indicates whether the device supports the 720 * 1280 screen size.

This attribute is read-only.

readonly boolean autoRotation

Indicates whether the device supports auto rotation.

This attribute is read-only.

readonly boolean shellAppWidget

Indicates whether the device supports shell app widget(dynamic box).

This attribute is read-only.

readonly boolean visionImageRecognition

Indicates whether the device supports vision image recognition.

This attribute is read-only.

readonly boolean visionQrcodeGeneration

Indicates whether the device supports vision qrcode generation.

This attribute is read-only.

readonly boolean visionQrcodeRecognition

Indicates whether the device supports vision qrcode recognition.

This attribute is read-only.

readonly boolean visionFaceRecognition

Indicates whether the device supports vision face recognition.

This attribute is read-only.

readonly boolean secureElement

Indicates whether the device supports secure element.

This attribute is read-only.

readonly boolean nativeOspCompatible

Indicates whether the device supports native osp API.

This attribute is read-only.

readonly SystemInfoProfile profile

Represents the profile of the current device.

This attribute is read-only.

2.4. SystemInfoOptions

An object containing the various options for fetching the properties requested.

  dictionary SystemInfoOptions {
    unsigned long timeout;

    double highThreshold;

    double lowThreshold;
  };

Dictionary members

unsigned long timeout

The number of milliseconds beyond which the operation must be interrupted.

double highThreshold

An attribute to indicate that the successCallback() method in the watch operation will be triggered only if the device property is a number and its value is greater than or equal to this number. This attribute has no effect on the get() method.

double lowThreshold

An attribute to indicate that the successCallback() method in the watch operation must be triggered only if the property is a number and its value is lower than or equal to this number. If both highThreshold and lowThreshold parameters are specified, the successCallback() is triggered if and only if the property value is either lower than the value of lowThreshold or higher than the value of highThreshold. This attribute has no effect on the get method.

2.5. SystemInfoPropertySuccessCallback

Systemfinfo specific success callback.

  [Callback=FunctionOnly, NoInterfaceObject] interface SystemInfoPropertySuccessCallback {
    void onsuccess(SystemInfoProperty prop);
  };

This callback interface specifies a success callback with SystemInfoProperty as input argument. It is used in asynchronous operations, such as getPropertyValue() or addPropertyValueChangeListener()

METHODS

onsuccess

Method invoked when the asynchronous call completes successfully.

Signature
void onsuccess(SystemInfoProperty prop);
Parameters
  • prop
    • Optional: No.
    • Nullable: No.
    • Type: SystemInfoProperty.
    • Description: The property returned from a successful asynchronous operation.

2.6. SystemInfoProperty

This is a common abstract interface used by different types of system information objects.

  [NoInterfaceObject] interface SystemInfoProperty {
  };

2.7. SystemInfoBattery

This property reflects the general state of the system's battery

  [NoInterfaceObject] interface SystemInfoBattery : SystemInfoProperty {
    readonly attribute double level;

    readonly attribute boolean isCharging;
  };

ATTRIBUTES

readonly double level

An attribute to specify the remaining level of an internal battery, scaled from 0 to 1:

  • 0 indicates that the battery level is the lowest and the system is about to enter shutdown mode.
  • 1 indicates that the system's charge is maximum.

Any threshold parameter used in a watch operation to monitor this property applies to this attribute.

This attribute is read-only.

readonly boolean isCharging

Indicates whether the battery source is currently charging.

This attribute is read-only.

2.8. SystemInfoCpu

This property reflects the state of the CPUs available to this system.

  [NoInterfaceObject] interface SystemInfoCpu : SystemInfoProperty {
    readonly attribute double load;
  };

ATTRIBUTES

readonly double load

An attribute to indicate the current CPU load, as a number between 0.0 and 1.0, representing the minimum and maximum values allowed on this system. Any threshold parameter used in a watch function to monitor this property applies to this attribute.

This attribute is read-only.

2.9. SystemInfoStorage

This property exposes the data storage devices connected to this system.

  [NoInterfaceObject] interface SystemInfoStorage : SystemInfoProperty {
    readonly attribute SystemInfoStorageUnit[] units;
  };

ATTRIBUTES

readonly SystemInfoStorageUnit[] units

The array of storage units connected to this device.

This attribute is read-only.

2.10. SystemInfoStorageUnit

This property exposes a single storage device connected to this system.

  [NoInterfaceObject] interface SystemInfoStorageUnit : SystemInfoProperty {
    readonly attribute DOMString type;

    readonly attribute unsigned long long capacity;

    readonly attribute unsigned long long availableCapacity;

    readonly attribute boolean isRemovable;

    readonly attribute boolean isRemoveable;
  };

ATTRIBUTES

readonly DOMString type

The type of a storage device. The value is one of the constants defined for this type.

The supported storage unit types are:

  • UNKNOWN
  • INTERNAL
  • USB_HOST
  • MMC
This attribute is read-only.

readonly unsigned long long capacity

The amount of data that this device can hold, in bytes.

This attribute is read-only.

readonly unsigned long long availableCapacity

The amount of available data that this device can hold, in bytes.

This attribute is read-only.

readonly boolean isRemovable

An attribute to indicate whether a device can be removed or not.

The following values are supported:

  • true - If this storage unit can be removed from the system (such as an sdcard unplugged)
  • false - If this storage unit cannot be removed from the system
This attribute is read-only.

readonly boolean isRemoveable

true if this unit can be removed from the system (such as an sdcard unplugged), false otherwise.

This attribute is read-only.

2.11. SystemInfoDisplay

This property reflects the information of the Display.

  [NoInterfaceObject] interface SystemInfoDisplay : SystemInfoProperty {
    readonly attribute unsigned long resolutionWidth;

    readonly attribute unsigned long resolutionHeight;

    readonly attribute unsigned long dotsPerInchWidth;

    readonly attribute unsigned long dotsPerInchHeight;

    readonly attribute double physicalWidth;

    readonly attribute double physicalHeight;

    readonly attribute double brightness;
  };

ATTRIBUTES

readonly unsigned long resolutionWidth

The total number of addressable pixels in the horizontal direction of a rectangular entity (such as Camera, Display, Image, Video, ...) when held in its default orientation.

This attribute is read-only.

readonly unsigned long resolutionHeight

The total number of addressable pixels in the vertical direction of a rectangular element (such as Camera, Display, Image, Video, ...) when held in its default orientation.

This attribute is read-only.

readonly unsigned long dotsPerInchWidth

Resolution of this device, along its width, in dots per inch.

This attribute is read-only.

readonly unsigned long dotsPerInchHeight

Resolution of this device, along its height, in dots per inch.

This attribute is read-only.

readonly double physicalWidth

The display's physical width in millimeters.

This attribute is read-only.

readonly double physicalHeight

The display's physical height in millimeters.

This attribute is read-only.

readonly double brightness

The current brightness of a display ranging between 0 to 1.

This attribute is read-only.

2.12. SystemInfoDeviceOrientation

This property reflects the information of the device orientation in this system.

  [NoInterfaceObject] interface SystemInfoDeviceOrientation : SystemInfoProperty {

    readonly attribute SystemInfoDeviceOrientationStatus status;
    readonly attribute boolean isAutoRotation;
  };

ATTRIBUTES

readonly SystemInfoDeviceOrientationStatus status

Represents the status of the current device orientation.

This attribute is read-only.

readonly boolean isAutoRotation

whether the device is in autorotation.

This attribute is read-only.

2.13. SystemInfoBuild

This property reflects the information of the current device.

  [NoInterfaceObject] interface SystemInfoBuild : SystemInfoProperty {

    readonly attribute DOMString model;
    readonly attribute DOMString manufacturer;
    readonly attribute DOMString buildVersion;
    readonly attribute DOMString product;
  };

ATTRIBUTES

readonly DOMString model

Represents the model name of the current device.

This attribute is read-only.

readonly DOMString manufacturer

Represents the manufacturer of the device.

This attribute is read-only.

readonly DOMString buildVersion

Represents the build version information of the device.

This attribute is read-only.

readonly DOMString product

Represents the product information of the device.

This attribute is read-only.

2.14. SystemInfoLocale

This property reflects the locale information of the current device.

  [NoInterfaceObject] interface SystemInfoLocale : SystemInfoProperty {

    readonly attribute DOMString language;

    readonly attribute DOMString country;
  };

ATTRIBUTES

readonly DOMString language

Indicates the current language setting in the (LANGUAGE)_(REGION) syntax. The language setting is in the ISO 630-2 format and the region setting is in the ISO 3166-1 format. The language setting is case-sensitive.

This attribute is read-only.

readonly DOMString country

Indicates the current country setting in the (LANGUAGE)_(REGION) syntax. The language setting is in the ISO 630-2 format and the region setting is in the ISO 3166-1 format. The country setting is case-sensitive.

This attribute is read-only.

2.15. SystemInfoNetwork

This property reflects the information of the data network in this system.

  [NoInterfaceObject] interface SystemInfoNetwork : SystemInfoProperty {

    readonly attribute SystemInfoNetworkType networkType;
  };

ATTRIBUTES

readonly SystemInfoNetworkType networkType

Represents the network type of the current data network.

This attribute is read-only.

2.16. SystemInfoWifiNetwork

This property reflects the information of the Wi-Fi network in this system.

   [NoInterfaceObject] interface SystemInfoWifiNetwork : SystemInfoProperty {

    readonly attribute DOMString status;
    readonly attribute DOMString ssid;
    readonly attribute DOMString ipAddress;
     readonly attribute DOMString ipv6Address;
    readonly attribute double signalStrength;
  };

ATTRIBUTES

readonly DOMString status

Represents the status (ON or OFF) of the Wi-Fi interface.

This attribute is read-only.

readonly DOMString ssid

Represents the SSID of a Wi-Fi network.

This attribute is read-only.

readonly DOMString ipAddress

Represents the IPv4 address of Wi-Fi network.

This attribute is read-only.

readonly DOMString ipv6Address

Represents the IPv6 address of Wi-Fi network.

This attribute is read-only.

readonly double signalStrength

This connection's signal strength, as a normalized value between 0 (no signal detected) and 1 (the level is at its maximum value).

This attribute is read-only.

2.17. SystemInfoCellularNetwork

This property reflects the information of the Cellular network in this system.

  [NoInterfaceObject] interface SystemInfoCellularNetwork : SystemInfoProperty {

    readonly attribute DOMString status;
    readonly attribute DOMString apn;
    readonly attribute DOMString ipAddress;
    readonly attribute DOMString ipv6Address;
    readonly attribute unsigned short mcc;
    readonly attribute unsigned short mnc;
    readonly attribute unsigned short cellId;
    readonly attribute unsigned short lac;
    readonly attribute boolean isRoaming;
    readonly attribute boolean isFlightMode;
    readonly attribute DOMString imei;
  };

ATTRIBUTES

readonly DOMString status

Represents the status (ON or OFF) of the cellular network.

This attribute is read-only.

readonly DOMString apn

Represents an Access Point Name of the cellular network.

This attribute is read-only.

readonly DOMString ipAddress

Represents the IPv4 address of the cellular network.

This attribute is read-only.

readonly DOMString ipv6Address

Represents the IPv6 address of the cellular network.

This attribute is read-only.

readonly unsigned short mcc

Represents Mobile Country Code (MCC) of the cellular network.

This attribute is read-only.

readonly unsigned short mnc

Represents Mobile Network Code (MNC) of the cellular network. MNC is used in combination with MCC (also known as a "MCC / MNC tuple") to uniquely identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and UMTS public land mobile networks and some satellite mobile networks.

This attribute is read-only.

readonly unsigned short cellId

Represents Cell Id.

This attribute is read-only.

readonly unsigned short lac

Represents Location Area Code.

This attribute is read-only.

readonly boolean isRoaming

Whether the connection is set up while the device is roaming.

This attribute is read-only.

readonly boolean isFlightMode

Indicates whether the device is in flight mode.

This attribute is read-only.

readonly DOMString imei

Represents the International Mobile Equipment Identity (IMEI).

This attribute is read-only.

2.18. SystemInfoEthernetNetwork

This property reflects the information of the Ethernet network in this system.

  [NoInterfaceObject] interface SystemInfoEthernetNetwork : SystemInfoProperty {    
    readonly attribute DOMString status;    
    readonly attribute DOMString ipAddress;    
    readonly attribute DOMString ipv6Address;    
    readonly attribute DOMString dns;    
    readonly attribute DOMString gateway;    
    readonly attribute DOMString subnetMask;    
    readonly attribute DOMString mac;    
  };

ATTRIBUTES

readonly DOMString status

Represents the status (ON or OFF) of the Ethernet network.

This attribute is read-only.

readonly DOMString ipAddress

Represents the IPv4 address of the Ethernet network.

This attribute is read-only.

readonly DOMString ipv6Address

Represents the IPv6 address of the Ethernet network.

This attribute is read-only.

readonly DOMString dns

Represents the Domain Name System (DNS) of the Ethernet network.

This attribute is read-only.

readonly DOMString gateway

Represents the gateway of the Ethernet network.

This attribute is read-only.

readonly DOMString subnetMask

Represents Subnet Mask of the Ethernet network.

This attribute is read-only.

readonly DOMString mac

Represents MAC Address of the Ethernet network.

This attribute is read-only.

2.19. SystemInfoSIM

This property reflects the information of the SIM card information.

  [NoInterfaceObject] interface SystemInfoSIM : SystemInfoProperty {
    readonly attribute SystemInfoSimState state;
    readonly attribute DOMString operatorName;
    readonly attribute DOMString msisdn;
    readonly attribute DOMString iccid;
    readonly attribute unsigned short mcc;
    readonly attribute unsigned short mnc;
    readonly attribute DOMString msin;
    readonly attribute DOMString spn;
  };

ATTRIBUTES

readonly SystemInfoSimState state

Represents the SIM card state.

This attribute is read-only.

readonly DOMString operatorName

Represents the Operator Name String (ONS) of Common PCN Handset Specification (CPHS) in SIM card.

This attribute is read-only.

readonly DOMString msisdn

Represents the SIM card subscriber number.

This attribute is read-only.

readonly DOMString iccid

Represents the Integrated Circuit Card ID.

This attribute is read-only.

readonly unsigned short mcc

Represents the Mobile Country Code (MCC) of SIM provider.

This attribute is read-only.

readonly unsigned short mnc

Represents the Mobile Network Code (MNC) of SIM provider.

This attribute is read-only.

readonly DOMString msin

Represents the Mobile Subscription Identification Number (MSIN) of SIM provider.

This attribute is read-only.

readonly DOMString spn

Represents the Service Provider Name (SPN) of SIM card.

This attribute is read-only.

2.20. SystemInfoPeripheral

This property reflects the peripheral information of the current device.

  [NoInterfaceObject] interface SystemInfoPeripheral : SystemInfoProperty {

    readonly attribute boolean isVideoOutputOn;
  };

ATTRIBUTES

readonly boolean isVideoOutputOn

Represents the video out status.

This attribute is read-only.

2.21. SystemInfoVideoSourceInfo

This property reflects each input source the current device has.

  [NoInterfaceObject] interface SystemInfoVideoSourceInfo {

    readonly attribute SystemInfoVideoSourceType type;

     readonly attribute long number;
  };

If there are 2 HDMI inputs on a device, Two SystemInfoVideoSourceInfo objects must be retreived through SystemInfoVideoSource
{type=HDMI, number=1}, {type=HDMI, number=2}

ATTRIBUTES

readonly SystemInfoVideoSourceType type

Represents the type of the video input source.

This attribute is read-only.

readonly long number

Represents the input number of the input source.

If the source is "HDMI 2", the number is 2.

This attribute is read-only.

2.22. SystemInfoVideoSource

This property reflects the video sources the device has.

  [NoInterfaceObject] interface SystemInfoVideoSource : SystemInfoProperty {

    readonly attribute SystemInfoVideoSourceInfo[] connected;

    readonly attribute SystemInfoVideoSourceInfo[] disconnected;
  };

ATTRIBUTES

readonly SystemInfoVideoSourceInfo[] connected

Represents a list of video sources that a device is connected with.

This attribute is read-only.

readonly SystemInfoVideoSourceInfo[] disconnected

Represents a list of video sources that a device is not connected with.

This attribute is read-only.

3. Full WebIDL

module SystemInfo {

  enum SystemInfoPropertyId { "BATTERY" , "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK", "CELLULAR_NETWORK", "ETHERNET_NETWORK", "SIM", "PERIPHERAL", "VIDEOSOURCE" };

  enum SystemInfoNetworkType { "NONE", "2G", "2.5G", "3G", "4G", "WIFI", "ETHERNET", "UNKNOWN" };

  enum SystemInfoDeviceOrientationStatus { "PORTRAIT_PRIMARY", "PORTRAIT_SECONDARY", "LANDSCAPE_PRIMARY", "LANDSCAPE_SECONDARY" };

  enum SystemInfoSimState { "ABSENT", "INITIALIZING", "READY", "PIN_REQUIRED", "PUK_REQUIRED", "NETWORK_LOCKED", "SIM_LOCKED", "UNKNOWN" };

  enum SystemInfoProfile { "MOBILE_FULL", "MOBILE_WEB" };

  enum SystemInfoVideoSourceType { "TV", "AV", "SVIDEO", "COMP", "PC", "HDMI", "SCART", "DVI" };

  [NoInterfaceObject] interface SystemInfoObject {
    readonly attribute SystemInfo systeminfo;
  };
  WebAPIs implements SystemInfoObject;

  [NoInterfaceObject] interface SystemInfo {

    SystemInfoDeviceCapability getCapabilities() raises(WebAPIException);

    void getPropertyValue(SystemInfoPropertyId property,
                          SystemInfoPropertySuccessCallback successCallback,
                          optional ErrorCallback? errorCallback) raises(WebAPIException);

    unsigned long addPropertyValueChangeListener(SystemInfoPropertyId property,
                                        SystemInfoPropertySuccessCallback successCallback,
                                        optional SystemInfoOptions? options) raises(WebAPIException);

    void removePropertyValueChangeListener(unsigned long listenerId) raises(WebAPIException);
  };

  [NoInterfaceObject] interface SystemInfoDeviceCapability {
    readonly attribute boolean bluetooth;

    readonly attribute boolean nfc;

    readonly attribute boolean nfcReservedPush ;

    readonly attribute unsigned short multiTouchCount;

    readonly attribute boolean inputKeyboard;

    readonly attribute boolean inputKeyboardLayout;

    readonly attribute boolean wifi;

    readonly attribute boolean wifiDirect;

    readonly attribute boolean opengles;

    readonly attribute DOMString openglestextureFormat;

    readonly attribute boolean openglesVersion1_1;

    readonly attribute boolean openglesVersion2_0;

    readonly attribute boolean fmRadio;

    readonly attribute DOMString platformVersion;

    readonly attribute DOMString webApiVersion;

    readonly attribute DOMString nativeApiVersion;

    readonly attribute DOMString platformName;

    readonly attribute boolean camera;

    readonly attribute boolean cameraFront;

    readonly attribute boolean cameraFrontFlash;

    readonly attribute boolean cameraBack;

    readonly attribute boolean cameraBackFlash;

    readonly attribute boolean location;

    readonly attribute boolean locationGps;

    readonly attribute boolean locationWps;

    readonly attribute boolean microphone;

    readonly attribute boolean usbHost;

    readonly attribute boolean usbAccessory;

    readonly attribute boolean screenOutputRca;

    readonly attribute boolean screenOutputHdmi;

    readonly attribute DOMString platformCoreCpuArch;

    readonly attribute DOMString platformCoreFpuArch;

    readonly attribute boolean sipVoip;

    readonly attribute DOMString duid;

    readonly attribute boolean speechRecognition;

    readonly attribute boolean speechSynthesis;

    readonly attribute boolean accelerometer;

    readonly attribute boolean accelerometerWakeup;

    readonly attribute boolean barometer;

    readonly attribute boolean barometerWakeup;

    readonly attribute boolean gyroscope;

    readonly attribute boolean gyroscopeWakeup;

    readonly attribute boolean magnetometer;

    readonly attribute boolean magnetometerWakeup;

    readonly attribute boolean photometer;

    readonly attribute boolean photometerWakeup;

    readonly attribute boolean proximity;

    readonly attribute boolean proximityWakeup;

    readonly attribute boolean tiltmeter;

    readonly attribute boolean tiltmeterWakeup;

    readonly attribute boolean dataEncryption;

    readonly attribute boolean graphicsAcceleration;

    readonly attribute boolean push;

    readonly attribute boolean telephony;

    readonly attribute boolean telephonyMms;

    readonly attribute boolean telephonySms;

    readonly attribute boolean screenSizeNormal;

    readonly attribute boolean screenSize480_800;

    readonly attribute boolean screenSize720_1280;

    readonly attribute boolean autoRotation;

    readonly attribute boolean shellAppWidget;

    readonly attribute boolean visionImageRecognition;

    readonly attribute boolean visionQrcodeGeneration;

    readonly attribute boolean visionQrcodeRecognition;

    readonly attribute boolean visionFaceRecognition;

    readonly attribute boolean secureElement;

    readonly attribute boolean nativeOspCompatible;

    readonly attribute SystemInfoProfile profile;
  };

  dictionary SystemInfoOptions {
    unsigned long timeout;

    double highThreshold;

    double lowThreshold;
  };

  [Callback=FunctionOnly, NoInterfaceObject] interface SystemInfoPropertySuccessCallback {
    void onsuccess(SystemInfoProperty prop);
  };

  [NoInterfaceObject] interface SystemInfoProperty {
  };

  [NoInterfaceObject] interface SystemInfoBattery : SystemInfoProperty {
    readonly attribute double level;

    readonly attribute boolean isCharging;
  };

  [NoInterfaceObject] interface SystemInfoCpu : SystemInfoProperty {
    readonly attribute double load;
  };

  [NoInterfaceObject] interface SystemInfoStorage : SystemInfoProperty {
    readonly attribute SystemInfoStorageUnit[] units;
  };

  [NoInterfaceObject] interface SystemInfoStorageUnit : SystemInfoProperty {
    readonly attribute DOMString type;

    readonly attribute unsigned long long capacity;

    readonly attribute unsigned long long availableCapacity;

    readonly attribute boolean isRemovable;

    readonly attribute boolean isRemoveable;
  };

  [NoInterfaceObject] interface SystemInfoDisplay : SystemInfoProperty {
    readonly attribute unsigned long resolutionWidth;

    readonly attribute unsigned long resolutionHeight;

    readonly attribute unsigned long dotsPerInchWidth;

    readonly attribute unsigned long dotsPerInchHeight;

    readonly attribute double physicalWidth;

    readonly attribute double physicalHeight;

    readonly attribute double brightness;
  };

  [NoInterfaceObject] interface SystemInfoDeviceOrientation : SystemInfoProperty {

    readonly attribute SystemInfoDeviceOrientationStatus status;
    readonly attribute boolean isAutoRotation;
  };

  [NoInterfaceObject] interface SystemInfoBuild : SystemInfoProperty {

    readonly attribute DOMString model;
    readonly attribute DOMString manufacturer;
    readonly attribute DOMString buildVersion;
    readonly attribute DOMString product;
  };

  [NoInterfaceObject] interface SystemInfoLocale : SystemInfoProperty {

    readonly attribute DOMString language;

    readonly attribute DOMString country;
  };

  [NoInterfaceObject] interface SystemInfoNetwork : SystemInfoProperty {

    readonly attribute SystemInfoNetworkType networkType;
  };

   [NoInterfaceObject] interface SystemInfoWifiNetwork : SystemInfoProperty {

    readonly attribute DOMString status;
    readonly attribute DOMString ssid;
    readonly attribute DOMString ipAddress;
     readonly attribute DOMString ipv6Address;
    readonly attribute double signalStrength;
  };

  [NoInterfaceObject] interface SystemInfoCellularNetwork : SystemInfoProperty {

    readonly attribute DOMString status;
    readonly attribute DOMString apn;
    readonly attribute DOMString ipAddress;
    readonly attribute DOMString ipv6Address;
    readonly attribute unsigned short mcc;
    readonly attribute unsigned short mnc;
    readonly attribute unsigned short cellId;
    readonly attribute unsigned short lac;
    readonly attribute boolean isRoaming;
    readonly attribute boolean isFlightMode;
    readonly attribute DOMString imei;
  };
  [NoInterfaceObject] interface SystemInfoEthernetNetwork : SystemInfoProperty {    
    readonly attribute DOMString status;    
    readonly attribute DOMString ipAddress;    
    readonly attribute DOMString ipv6Address;    
    readonly attribute DOMString dns;    
    readonly attribute DOMString gateway;    
    readonly attribute DOMString subnetMask;    
    readonly attribute DOMString mac;    
  };

  [NoInterfaceObject] interface SystemInfoSIM : SystemInfoProperty {
    readonly attribute SystemInfoSimState state;
    readonly attribute DOMString operatorName;
    readonly attribute DOMString msisdn;
    readonly attribute DOMString iccid;
    readonly attribute unsigned short mcc;
    readonly attribute unsigned short mnc;
    readonly attribute DOMString msin;
    readonly attribute DOMString spn;
  };

  [NoInterfaceObject] interface SystemInfoPeripheral : SystemInfoProperty {

    readonly attribute boolean isVideoOutputOn;
  };

  [NoInterfaceObject] interface SystemInfoVideoSourceInfo {

    readonly attribute SystemInfoVideoSourceType type;

     readonly attribute long number;
  };

  [NoInterfaceObject] interface SystemInfoVideoSource : SystemInfoProperty {

    readonly attribute SystemInfoVideoSourceInfo[] connected;

    readonly attribute SystemInfoVideoSourceInfo[] disconnected;
  };
};