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.
Web applications can use this API to access the following system properties:
Not all above properties may be available on every Tizen device. For instance, a device may not support the telephony feature. In that case, CELLULAR_NETWORK and SIM are not available.
To check the available SystemInfoPropertyId, tizen.systeminfo.getCapability() can be used.
For more information on the SystemInfo features, see System Information Guide.
Since: 2.4
enum SystemInfoPropertyId { "BATTERY", "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK",
"ETHERNET_NETWORK", "CELLULAR_NETWORK", "NET_PROXY_NETWORK", "SIM", "PERIPHERAL", "MEMORY", "VIDEOSOURCE", "CAMERA_FLASH", "ADS" };
Since: 2.4
Remark : CAMERA_FLASH is supported since Tizen 2.4
Remark : ETHERNET_NETWORK is supported since Tizen 2.4
Remark : LOCALE and PERIPHERAL are supported since Tizen 2.4
Remark : MEMORY is supported since Tizen 2.4
Remark : NET_PROXY_NETWORK is supported since Tizen 3.0
Remark : VIDEOSOURCE is supported since Tizen 2.4
Remark : ADS is supported since Tizen 3.0. Not supported on TV
enum SystemInfoNetworkType { "NONE", "2G", "2.5G", "3G", "4G", "WIFI", "ETHERNET", "NET_PROXY", "UNKNOWN" };
Since: 2.4
Remark : NET_PROXY is supported since Tizen 3.0
enum SystemInfoWifiSecurityMode { "NONE", "WEP", "WPA_PSK", "WPA2_PSK", "EAP" };
Since: 2.4
enum SystemInfoWifiEncryptionType { "NONE", "WEP", "TKIP", "AES", "TKIP_AES_MIXED" };
Since: 2.4
enum SystemInfoNetworkIpMode { "NONE", "STATIC", "DYNAMIC", "AUTO", "FIXED" };
Since: 2.4
enum SystemInfoDeviceOrientationStatus { "PORTRAIT_PRIMARY", "PORTRAIT_SECONDARY", "LANDSCAPE_PRIMARY", "LANDSCAPE_SECONDARY" };
Since: 2.4
SystemInfo reports the orientation of the device depending on the type of the device and physical position of the device relative to vertical direction. A "phone type device" is a device for which the portrait position is the natural orientation. A "tab type device" is a device for which the landscape position is basic working orientation.
SystemInfoDeviceOrientationStatus | phone type device | tablet type device |
---|---|---|
PORTRAIT_PRIMARY | natural position | rotated 90 degrees right (clockwise) |
PORTRAIT_SECONDARY | upside down, in other words rotated 180 degrees | rotated 90 degrees left (anticlockwise) |
LANDSCAPE_PRIMARY | rotated 90 degrees left (anticlockwise) | natural position |
LANDSCAPE_SECONDARY | rotated 90 degrees right (clockwise) | upside down, in other words rotated 180 degrees |
enum SystemInfoSimState { "ABSENT", "INITIALIZING", "READY", "PIN_REQUIRED", "PUK_REQUIRED", "NETWORK_LOCKED", "SIM_LOCKED", "UNKNOWN" };
Since: 2.4
Deprecated. "MOBILE_FULL" and "MOBILE_WEB" are deprecated since Tizen 2.4 and will be removed in Tizen 3.0.
Beginning with Tizen 2.4, "MOBILE" is returned instead of "MOBILE_FULL".
enum SystemInfoProfile { "MOBILE_FULL", "MOBILE_WEB", "MOBILE", "WEARABLE", "TV" };
Since: 2.4
Remark : "MOBILE" and "WEARABLE" are supported since Tizen 2.4
Remark : TV is supported since Tizen 2.4
enum SystemInfoLowMemoryStatus { "NORMAL", "WARNING" };
Since: 2.4
enum SystemInfoVideoSourceType {
"TV",
"AV",
"SVIDEO",
"COMP",
"PC",
"HDMI",
"SCART",
"DVI",
"MEDIA"
};
Since: 2.4
[NoInterfaceObject] interface SystemInfoObject {
readonly attribute SystemInfo systeminfo;
};
Tizen implements SystemInfoObject;
Since: 2.4
There will be a tizen.systeminfo object that allows accessing the functionality of the SystemInfo API.
[NoInterfaceObject] interface SystemInfo {
long long getTotalMemory() raises(WebAPIException);
long long getAvailableMemory() raises(WebAPIException);
any getCapability(DOMString key) raises(WebAPIException);
long getCount(SystemInfoPropertyId property) raises(WebAPIException);
void getPropertyValue(SystemInfoPropertyId property,
SystemInfoPropertySuccessCallback successCallback,
optional ErrorCallback? errorCallback) raises(WebAPIException);
void getPropertyValueArray(SystemInfoPropertyId property,
SystemInfoPropertyArraySuccessCallback successCallback,
optional ErrorCallback? errorCallback) raises(WebAPIException);
unsigned long addPropertyValueChangeListener(SystemInfoPropertyId property,
SystemInfoPropertySuccessCallback successCallback,
optional SystemInfoOptions? options,
optional ErrorCallback? errorCallback) raises(WebAPIException);
unsigned long addPropertyValueArrayChangeListener(SystemInfoPropertyId property,
SystemInfoPropertyArraySuccessCallback successCallback,
optional SystemInfoOptions? options,
optional ErrorCallback? errorCallback) 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.
getTotalMemory
long long getTotalMemory();
Since: 2.4
Exceptions:
with error type UnknownError in any error case.
Code example:
// To get total amount of system memory
console.log("The total memory size is " + tizen.systeminfo.getTotalMemory() + " bytes.");
getAvailableMemory
long long getAvailableMemory();
Since: 2.4
Exceptions:
with error type UnknownError in any error case
Code example:
// To get total amount of system memory
console.log("The available memory size is " + tizen.systeminfo.getAvailableMemory() + " bytes.");
getCapabilities
Deprecated. Deprecated since 2.4. Instead, use getCapability().
SystemInfoDeviceCapability getCapabilities();
Since: 2.4
The function must synchronously acquire the capabilities of the device.
Exceptions:
with error type UnknownError in any error case.
Code example:
var deviceCapabilities;
deviceCapabilities = tizen.systeminfo.getCapabilities();
if (deviceCapabilities.bluetooth) {
console.log("Bluetooth is supported");
}
getCapability
any getCapability(DOMString key);
Since: 2.4
See the available device capability keys. The additional keys for the custom device capability are specified by OEM's and vendors.
Parameters:
Return value:
any The value of the specified device capabilityExceptions:
with error type UnknownError in any other error case.
Code example:
try {
// Checks if a device supports bluetooth API or not
var bluetooth = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth");
console.log(" Bluetooth = " + bluetooth);
} catch (error) {
console.log("Error name: " + error.name + ", message: " + error.message);
}
getCount
long getCount(SystemInfoPropertyId property);
Since: 2.4
That is the length of array retrieved by the getPropertyValueArray() method for the given property.
Parameters:
Return value:
long The number of property values for the given property. If the property is not supported, 0 is returned.Exceptions:
with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
Code example:
var count = tizen.systeminfo.getCount("SIM");
if (count === 0) {
console.log("There is no available SIM card.");
} else {
console.log("There is(are) " + count + " SIM card(s) available.");
}
getPropertyValue
void getPropertyValue(SystemInfoPropertyId property, SystemInfoPropertySuccessCallback successCallback, optional ErrorCallback? errorCallback);
Since: 2.4
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 method can be launched with these error types:
Remark : If the given property is not supported, NotSupportedError would be passed through a ErrorCallback() since Tizen 2.4.
Remark : If system provides more than one value for the system property, the primary(first) system property is returned through SystemInfoSuccessCallback.
Parameters:
Exceptions:
with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
with error type UnknownError in any other error case.
with error type SecurityError, this error is only thrown for CELLULAR_NETWORK property when an application does not declare http://tizen.org/privilege/telephony privilege in config.xml.
Code example:
function onSuccessCallback(cpu) {
console.log("The cpu load is " + cpu.load);
}
function onErrorCallback(error) {
console.log("An error occurred " + error.message);
}
tizen.systeminfo.getPropertyValue("CPU", onSuccessCallback, onErrorCallback);
Code example:
function onSuccessCallback(cellular) {
console.log("The status of the cellular network is " + cellular.status);
}
function onErrorCallback(error) {
console.log("An error occurred " + error.message);
// if telephony_capability is false but getPropertyValue("CELLULAR_NETWORK, ..) is called, NotSupportedError would be passed.
}
var telephony_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.telephony");
if (telephony_capability === true) {
// onSuccessCallback will be invoked.
tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", onSuccessCallback, onErrorCallback);
} else {
console.log("Telephony feature is not supported. Cellular network related information cannot be retrieved.");
}
getPropertyValueArray
void getPropertyValueArray(SystemInfoPropertyId property, SystemInfoPropertyArraySuccessCallback successCallback, optional ErrorCallback? errorCallback);
Since: 2.4
It is recommended that you check if a device provides one or more than one value for a particular system property via getCount().
If one particular system property is provided on a device, it returns an array containing one SystemInfoProperty object through SystemInfoPropertyArraySuccessCallback method.
If more than one particular system property is provided, multiple SystemInfoProperty objects are returned.
The ErrorCallback method can be launched with these error types:
Remark : see getCount().
Parameters:
Exceptions:
with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
with error type SecurityError, this error is only thrown for CELLULAR_NETWORK property when an application does not declare http://tizen.org/privilege/telephony privilege in config.xml.
Code example:
function successCB(property) {
console.log("The SIM's current state is " + property.state);
}
function successArrayCB(properties) {
console.log("The number of the returned system properties is " + properties.length);
for (var i = 0; i < properties.length; i++) {
console.log("[" + i + "] SIM's state is " + properties[i].state);
}
}
var count = tizen.systeminfo.getCount("SIM");
if (count === 0) {
console.log("This device does not provide SIM card.");
} else if (count > 1) {
tizen.systeminfo.getPropertyValueArray("SIM", successArrayCB);
} else {
tizen.systeminfo.getPropertyValue("SIM", successCB);
}
addPropertyValueChangeListener
unsigned long addPropertyValueChangeListener(SystemInfoPropertyId property, SystemInfoPropertySuccessCallback successCallback, optional SystemInfoOptions? options, optional ErrorCallback? errorCallback);
Since: 2.4
When called, it immediately returns and then asynchronously starts a watch process defined by the following steps:
1. Register the successCallback to receive system events that the status of the requested properties may have changed.
2. When a system event is successfully received invoke the associated successCallback with an object containing the property values.
3. Repeat step 2 until removePropertyValueChangeListener function is called.
There are device properties which are never changed (e.g. "BUILD") and properties which are not changed on some devices (e.g. "DEVICE_ORIENTATION" in Tizen TV device). The addPropertyValueChangeListener() method accepts any identifier of these properties, but the listener added for them will not be invoked.
The errorCallback can be launched with any of these error types:
Remark : The errorCallback() is newly added as an optional parameter since Tizen 2.4.
Parameters:
Return value:
unsigned long An identifier used to clear the watch subscription.Exceptions:
with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
with error type InvalidValuesError, if any of the input parameters contain an invalid value (e.g. the invalid value for options).
with error type UnknownError in any other error case.
with error type SecurityError, this error is only thrown for CELLULAR_NETWORK property when an application does not declare http://tizen.org/privilege/telephony privilege in config.xml.
Code example:
function onSuccessCallback(cpu) {
console.log("The cpu load : " + cpu.load);
}
tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback, {lowThreshold : 0.2});
addPropertyValueArrayChangeListener
unsigned long addPropertyValueArrayChangeListener(SystemInfoPropertyId property, SystemInfoPropertyArraySuccessCallback successCallback, optional SystemInfoOptions? options, optional ErrorCallback? errorCallback);
Since: 2.4
The ErrorCallback method can be launched with these error types:
There are device properties which never change (for example "BUILD") and properties which do not change on the current platform (for example "DEVICE_ORIENTATION" for some platforms). The addPropertyValueChangeListener() method accepts any identifier of these properties, but the listener added for them will not be invoked.
Parameters:
Return value:
unsigned long An identifier used to clear the watch subscription.Exceptions:
with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
with error type InvalidValuesError, if any of the input parameters contain an invalid value (e.g. the invalid value for options).
with error type UnknownError in any other error case.
with error type SecurityError, this error is only thrown for CELLULAR_NETWORK property when an application does not declare http://tizen.org/privilege/telephony privilege in config.xml.
removePropertyValueChangeListener
void removePropertyValueChangeListener(unsigned long listenerId);
Since: 2.4
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:
Exceptions:
with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
with error type InvalidValuesError, if any of the input parameters contain an invalid value.
with error type UnknownError in any other error case.
Code example:
var id = null;
function onSuccessCallback(cpu) {
console.log("New value for CPU load is " + cpu.load);
if (id != null) { // After receiving the first notification, we clear it
tizen.systeminfo.removePropertyValueChangeListener(id);
}
}
id = tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback);
Deprecated. Deprecated since 2.4. Instead, use getCapability() to query device capabilities.
[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 raises(WebAPIException);
readonly attribute DOMString webApiVersion raises(WebAPIException);
readonly attribute DOMString nativeApiVersion raises(WebAPIException);
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;
};
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/system
Exceptions:
with error type SecurityError, if this attribute is not allowed.
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/system
Exceptions:
with error type SecurityError, if this attribute is not allowed.
For example, 1.0 represents a native api version where the major version is 1 and the minor version is 0. If a device doesn't provide Tizen native API, nativeApiVersion will be a empty string.
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/system
Exceptions:
with error type SecurityError, if this attribute is not allowed.
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Remark : Tizen ID is a randomly generated value based on the model name.
It is recommended to use tizen.systeminfo.getCapability("http://tizen.org/system/tizenid") since Tizen 2.4 instead.
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
dictionary SystemInfoOptions {
unsigned long timeout;
double highThreshold;
double lowThreshold;
};
Since: 2.4
The highThreshold and lowThreshold values are only applicable to the following SystemInfoPropertyId.
For other cases, it is ignored.
Since: 2.4
Since: 2.4
Since: 2.4
[Callback=FunctionOnly, NoInterfaceObject] interface SystemInfoPropertySuccessCallback {
void onsuccess(SystemInfoProperty property);
};
Since: 2.4
This callback interface specifies a success callback with SystemInfoProperty as input argument. It is used in asynchronous operations, such as getPropertyValue() or addPropertyValueChangeListener()
onsuccess
void onsuccess(SystemInfoProperty property);
Since: 2.4
Parameters:
[Callback=FunctionOnly, NoInterfaceObject] interface SystemInfoPropertyArraySuccessCallback {
void onsuccess(SystemInfoProperty[] properties);
};
Since: 2.4
This callback interface specifies a success callback with SystemInfoProperty as input argument. It is used in asynchronous operations, such as getPropertyValueArray() or addPropertyValueArrayChangeListener()
onsuccess
void onsuccess(SystemInfoProperty[] properties);
Since: 2.4
Parameters:
[NoInterfaceObject] interface SystemInfoProperty {
};
Since: 2.4
[NoInterfaceObject] interface SystemInfoBattery : SystemInfoProperty {
readonly attribute double level;
readonly attribute boolean isCharging;
readonly attribute long? timeToDischarge;
readonly attribute long? timeToFullCharge;
};
Since: 2.4
Any threshold parameter used in a watch operation to monitor this property applies to this attribute.
Since: 2.4
Since: 2.4
This parameter is mutually exclusive with parameter timeToFullCharge. An attribute timeToDischarge becomes null when device is plugged. This attribute may equal to -1 indicating there is no enough collected data, which means that the device is still learning. This process may take up to few days.
Since: 4.0
This parameter is mutually exclusive with parameter timeToDischarge. An attribute timeToFullCharge becomes null when device is unplugged. This attribute may equal to -1 indicating there is no enough collected data, which means that the device is still learning. This process may take up to few days.
Since: 4.0
[NoInterfaceObject] interface SystemInfoCpu : SystemInfoProperty {
readonly attribute double load;
};
Since: 2.4
Since: 2.4
[NoInterfaceObject] interface SystemInfoStorage : SystemInfoProperty {
readonly attribute SystemInfoStorageUnit[] units;
};
Since: 2.4
Since: 2.4
[NoInterfaceObject] interface SystemInfoStorageUnit : SystemInfoProperty {
readonly attribute DOMString type;
readonly attribute unsigned long long capacity;
readonly attribute unsigned long long availableCapacity;
readonly attribute boolean isRemovable;
};
The supported storage unit types are:
Since: 2.4
Since: 2.4
Since: 2.4
The following values are supported:
Since: 2.4
Deprecated. Deprecated since 2.4. Instead, use isRemovable.
Since: 2.4
[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;
};
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
[NoInterfaceObject] interface SystemInfoDeviceOrientation : SystemInfoProperty {
readonly attribute SystemInfoDeviceOrientationStatus status;
readonly attribute boolean isAutoRotation;
};
Since: 2.4
Since: 2.4
Since: 2.4
[NoInterfaceObject] interface SystemInfoBuild : SystemInfoProperty {
readonly attribute DOMString model;
readonly attribute DOMString manufacturer;
readonly attribute DOMString buildVersion;
};
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
[NoInterfaceObject] interface SystemInfoLocale : SystemInfoProperty {
readonly attribute DOMString language;
readonly attribute DOMString country;
};
Since: 2.4
Since: 2.4
Since: 2.4
[NoInterfaceObject] interface SystemInfoNetwork : SystemInfoProperty {
readonly attribute SystemInfoNetworkType networkType;
};
Since: 2.4
Since: 2.4
[NoInterfaceObject] interface SystemInfoWifiNetwork : SystemInfoProperty {
readonly attribute DOMString status;
readonly attribute DOMString ssid;
readonly attribute DOMString ipAddress;
readonly attribute DOMString ipv6Address;
readonly attribute DOMString macAddress;
readonly attribute double signalStrength;
readonly attribute SystemInfoWifiSecurityMode securityMode;
readonly attribute SystemInfoWifiEncryptionType encryptionType;
readonly attribute SystemInfoNetworkIpMode ipMode;
readonly attribute DOMString subnetMask;
readonly attribute DOMString gateway;
readonly attribute DOMString dns;
};
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
It is written in MM:MM:MM:SS:SS:SS format.
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
It is written in 255.255.255.255 format.
Since: 2.4
It is written in 255.255.255.255 format.
Since: 2.4
It is written in 255.255.255.255 format.
Since: 2.4
[NoInterfaceObject] interface SystemInfoEthernetNetwork : SystemInfoProperty {
readonly attribute DOMString cable;
readonly attribute DOMString status;
readonly attribute DOMString ipAddress;
readonly attribute DOMString ipv6Address;
readonly attribute DOMString macAddress;
readonly attribute SystemInfoNetworkIpMode ipMode;
readonly attribute DOMString subnetMask;
readonly attribute DOMString gateway;
readonly attribute DOMString dns;
};
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
It is written in MM:MM:MM:SS:SS:SS format.
Since: 2.4
Since: 2.4
It is written in 255.255.255.255 format.
Since: 2.4
It is written in 255.255.255.255 format.
Since: 2.4
It is written in 255.255.255.255 format.
Since: 2.4
[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 raises(WebAPIException);
readonly attribute SystemInfoNetworkIpMode ipMode;
readonly attribute DOMString subnetMask;
readonly attribute DOMString gateway;
readonly attribute DOMString dns;
};
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/telephony
Warning: http://tizen.org/privilege/systemmanager (partner level privilege) has been deprecated since 2.4. Instead, use http://tizen.org/privilege/telephony.
Exceptions:
with error type SecurityError, if this attribute is not allowed.
Since: 2.4
It is written in 255.255.255.255 format.
Since: 2.4
It is written in 255.255.255.255 format.
Since: 2.4
It is written in 255.255.255.255 format.
Since: 2.4
[NoInterfaceObject] interface SystemInfoNetProxyNetwork : SystemInfoProperty {
readonly attribute DOMString status;
};
Since: 3.0
Since: 3.0
[NoInterfaceObject] interface SystemInfoSIM : SystemInfoProperty {
readonly attribute SystemInfoSimState state raises(WebAPIException);
readonly attribute DOMString operatorName raises(WebAPIException);
readonly attribute DOMString msisdn raises(WebAPIException);
readonly attribute DOMString iccid raises(WebAPIException);
readonly attribute unsigned short mcc raises(WebAPIException);
readonly attribute unsigned short mnc raises(WebAPIException);
readonly attribute DOMString msin raises(WebAPIException);
readonly attribute DOMString spn raises(WebAPIException);
};
Since: 2.4
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/system
Exceptions:
with error type SecurityError, if this attribute is not allowed.
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/system
Exceptions:
with error type SecurityError, if this attribute is not allowed.
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/telephony
Warning: The partner level privilege, http://tizen.org/privilege/systemmanager, has been deprecated. From Tizen 2.4, the public level privilege, http://tizen.org/privilege/telephony, is required.
Exceptions:
with error type SecurityError, if this attribute is not allowed.
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/system
Exceptions:
with error type SecurityError, if this attribute is not allowed.
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/system
Exceptions:
with error type SecurityError, if this attribute is not allowed.
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/system
Exceptions:
with error type SecurityError, if this attribute is not allowed.
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/telephony
Warning: The partner level privilege, http://tizen.org/privilege/systemmanager, has been deprecated. From Tizen 2.4, the public level privilege, http://tizen.org/privilege/telephony, is required.
Exceptions:
with error type SecurityError, if this attribute is not allowed.
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/system
Exceptions:
with error type SecurityError, if this attribute is not allowed.
[NoInterfaceObject] interface SystemInfoPeripheral : SystemInfoProperty {
readonly attribute boolean isVideoOutputOn;
};
Since: 2.4
Since: 2.4
[NoInterfaceObject] interface SystemInfoMemory : SystemInfoProperty {
readonly attribute SystemInfoLowMemoryStatus status;
};
Since: 2.4
Since: 2.4
[NoInterfaceObject] interface SystemInfoVideoSourceInfo {
readonly attribute SystemInfoVideoSourceType type;
readonly attribute long number;
};
Since: 2.4
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}
Since: 2.4
If the source is "HDMI 2", the number is 2.
Since: 2.4
[NoInterfaceObject] interface SystemInfoVideoSource : SystemInfoProperty {
readonly attribute SystemInfoVideoSourceInfo[] connected;
readonly attribute SystemInfoVideoSourceInfo[] disconnected;
};
Since: 2.4
Since: 2.4
Since: 2.4
[NoInterfaceObject] interface SystemInfoCameraFlash : SystemInfoProperty {
readonly attribute double brightness raises(WebAPIException);
readonly attribute DOMString camera;
readonly attribute long levels raises(WebAPIException);
void setBrightness(double brightness) raises(WebAPIException);
};
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/led
Exceptions:
with error type SecurityError, if this attribute is not allowed.
Code example:
tizen.systeminfo.getPropertyValue("CAMERA_FLASH",
function (flash) {
console.log("Flash brightness is set to: " + (flash.brightness * 100).toFixed(0) + "%");
},
function (error) {
console.log("Error, name: " + error.name + ", message: " + error.message);
}
);
The getPropertyValue() method retrieves the SystemInfoCameraFlash for BACK camera.
Since: 2.4
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/led
Exceptions:
with error type SecurityError, if this attribute is not allowed.
setBrightness
void setBrightness(double brightness);
Since: 2.4
If the specified brightness value is not supported by the device, the brightness is rounded down to the nearest supported brightness value.
Privilege level: public
Privilege: http://tizen.org/privilege/led
Parameters:
Exceptions:
with error type InvalidValuesError, if any of the input parameters contain an invalid value.
with error type SecurityError, if the application does not have the privilege to call this method or if the author signature does not match that of the designated application.
with error type UnknownError, if the method cannot be completed because of an unknown error.
Code example:
tizen.systeminfo.getPropertyValue("CAMERA_FLASH",
function (flash) {
try {
flash.setBrightness(1);
} catch (error) {
console.log("Setting flash brightness failed: " + error.message);
}
},
function (error) {
console.log("Error, name: " + error.name + ", message: " + error.message);
}
);
[NoInterfaceObject] interface SystemInfoADS : SystemInfoProperty {
readonly attribute DOMString id;
};
Since: 3.0
Since: 3.0
To guarantee the running of the application on a device which has camera back flash and control it, declare the following feature requirements in the config file:
To guarantee the running of the application(e.g. track the battery usage) on a device which has a battery, declare the following feature requirements in the config file:
To guarantee the running of the application on a device which supports ethernet network feature, declare the following feature requirements in the config file:
To guarantee the running of the application on a device which supports telephony feature, declare the following feature requirements in the config file:
To guarantee the running of the application on a device which supports Wi-Fi, declare the following feature requirements in the config file:
To guarantee the running of the application on a device which supports network proxy for internet connection, declare the following feature requirements in the config file:
To guarantee the running of the application on a device which supports battery, declare the following feature requirements in the config file:
For more information, see Application Filtering.
module SystemInfo {
enum SystemInfoPropertyId { "BATTERY", "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK",
"ETHERNET_NETWORK", "CELLULAR_NETWORK", "NET_PROXY_NETWORK", "SIM", "PERIPHERAL", "MEMORY", "VIDEOSOURCE", "CAMERA_FLASH", "ADS" };
enum SystemInfoNetworkType { "NONE", "2G", "2.5G", "3G", "4G", "WIFI", "ETHERNET", "NET_PROXY", "UNKNOWN" };
enum SystemInfoWifiSecurityMode { "NONE", "WEP", "WPA_PSK", "WPA2_PSK", "EAP" };
enum SystemInfoWifiEncryptionType { "NONE", "WEP", "TKIP", "AES", "TKIP_AES_MIXED" };
enum SystemInfoNetworkIpMode { "NONE", "STATIC", "DYNAMIC", "AUTO", "FIXED" };
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", "MOBILE", "WEARABLE", "TV" };
enum SystemInfoLowMemoryStatus { "NORMAL", "WARNING" };
enum SystemInfoVideoSourceType {
"TV",
"AV",
"SVIDEO",
"COMP",
"PC",
"HDMI",
"SCART",
"DVI",
"MEDIA"
};
[NoInterfaceObject] interface SystemInfoObject {
readonly attribute SystemInfo systeminfo;
};
Tizen implements SystemInfoObject;
[NoInterfaceObject] interface SystemInfo {
long long getTotalMemory() raises(WebAPIException);
long long getAvailableMemory() raises(WebAPIException);
SystemInfoDeviceCapability getCapabilities() raises(WebAPIException);
any getCapability(DOMString key) raises(WebAPIException);
long getCount(SystemInfoPropertyId property) raises(WebAPIException);
void getPropertyValue(SystemInfoPropertyId property,
SystemInfoPropertySuccessCallback successCallback,
optional ErrorCallback? errorCallback) raises(WebAPIException);
void getPropertyValueArray(SystemInfoPropertyId property,
SystemInfoPropertyArraySuccessCallback successCallback,
optional ErrorCallback? errorCallback) raises(WebAPIException);
unsigned long addPropertyValueChangeListener(SystemInfoPropertyId property,
SystemInfoPropertySuccessCallback successCallback,
optional SystemInfoOptions? options,
optional ErrorCallback? errorCallback) raises(WebAPIException);
unsigned long addPropertyValueArrayChangeListener(SystemInfoPropertyId property,
SystemInfoPropertyArraySuccessCallback successCallback,
optional SystemInfoOptions? options,
optional ErrorCallback? errorCallback) raises(WebAPIException);
void removePropertyValueChangeListener(unsigned long listenerId) raises(WebAPIException);
};
dictionary SystemInfoOptions {
unsigned long timeout;
double highThreshold;
double lowThreshold;
};
[Callback=FunctionOnly, NoInterfaceObject] interface SystemInfoPropertySuccessCallback {
void onsuccess(SystemInfoProperty property);
};
[Callback=FunctionOnly, NoInterfaceObject] interface SystemInfoPropertyArraySuccessCallback {
void onsuccess(SystemInfoProperty[] properties);
};
[NoInterfaceObject] interface SystemInfoProperty {
};
[NoInterfaceObject] interface SystemInfoBattery : SystemInfoProperty {
readonly attribute double level;
readonly attribute boolean isCharging;
readonly attribute long? timeToDischarge;
readonly attribute long? timeToFullCharge;
};
[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;
};
[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;
};
[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 DOMString macAddress;
readonly attribute double signalStrength;
readonly attribute SystemInfoWifiSecurityMode securityMode;
readonly attribute SystemInfoWifiEncryptionType encryptionType;
readonly attribute SystemInfoNetworkIpMode ipMode;
readonly attribute DOMString subnetMask;
readonly attribute DOMString gateway;
readonly attribute DOMString dns;
};
[NoInterfaceObject] interface SystemInfoEthernetNetwork : SystemInfoProperty {
readonly attribute DOMString cable;
readonly attribute DOMString status;
readonly attribute DOMString ipAddress;
readonly attribute DOMString ipv6Address;
readonly attribute DOMString macAddress;
readonly attribute SystemInfoNetworkIpMode ipMode;
readonly attribute DOMString subnetMask;
readonly attribute DOMString gateway;
readonly attribute DOMString dns;
};
[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 raises(WebAPIException);
readonly attribute SystemInfoNetworkIpMode ipMode;
readonly attribute DOMString subnetMask;
readonly attribute DOMString gateway;
readonly attribute DOMString dns;
};
[NoInterfaceObject] interface SystemInfoNetProxyNetwork : SystemInfoProperty {
readonly attribute DOMString status;
};
[NoInterfaceObject] interface SystemInfoSIM : SystemInfoProperty {
readonly attribute SystemInfoSimState state raises(WebAPIException);
readonly attribute DOMString operatorName raises(WebAPIException);
readonly attribute DOMString msisdn raises(WebAPIException);
readonly attribute DOMString iccid raises(WebAPIException);
readonly attribute unsigned short mcc raises(WebAPIException);
readonly attribute unsigned short mnc raises(WebAPIException);
readonly attribute DOMString msin raises(WebAPIException);
readonly attribute DOMString spn raises(WebAPIException);
};
[NoInterfaceObject] interface SystemInfoPeripheral : SystemInfoProperty {
readonly attribute boolean isVideoOutputOn;
};
[NoInterfaceObject] interface SystemInfoMemory : SystemInfoProperty {
readonly attribute SystemInfoLowMemoryStatus status;
};
[NoInterfaceObject] interface SystemInfoVideoSourceInfo {
readonly attribute SystemInfoVideoSourceType type;
readonly attribute long number;
};
[NoInterfaceObject] interface SystemInfoVideoSource : SystemInfoProperty {
readonly attribute SystemInfoVideoSourceInfo[] connected;
readonly attribute SystemInfoVideoSourceInfo[] disconnected;
};
[NoInterfaceObject] interface SystemInfoCameraFlash : SystemInfoProperty {
readonly attribute double brightness raises(WebAPIException);
readonly attribute DOMString camera;
readonly attribute long levels raises(WebAPIException);
void setBrightness(double brightness) raises(WebAPIException);
};
[NoInterfaceObject] interface SystemInfoADS : SystemInfoProperty {
readonly attribute DOMString id;
};
};