PS6: Guide topics modified due to API updates.
Since the old getCapabilities() method has now been deleted from the
API, I think we can delete a note about it in the guide too.
PS7: Rebase
Change-Id: Ic2b9eccf9c6c1118e53e76a625908d371b2452d6
Signed-off-by: Lukasz Bardeli <l.bardeli@samsung.com>
</li>
</ol>
-<div class="note">
- <strong>Note</strong>
- The <code>getCapabilities()</code> method has been deprecated since Tizen 2.3. Use the <code>getCapability()</code> method instead.
-</div>
-
<p>For a list of available keys and their meaning, see the device capability keys (in <a href="../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/systeminfo_capability_keys.html">mobile</a> and <a href="../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/systeminfo_capability_keys.html">wearable</a> applications).</p>
Math.floor(storages[i].availableCapacity / 1000000)
+ " MB")
+ make2lineListItem("Removable",
- (storages[i].isRemoveable == true ? "Yes" : "No"));
+ (storages[i].isRemovable == true ? "Yes" : "No"));
}
$.mobile.changePage("#info");
<td>
<div>long long <a href="#SystemInfo::getTotalMemory">getTotalMemory</a> ()</div>
<div>long long <a href="#SystemInfo::getAvailableMemory">getAvailableMemory</a> ()</div>
-<div class="deprecated">
-<a href="#SystemInfoDeviceCapability">SystemInfoDeviceCapability</a> <a href="#SystemInfo::getCapabilities">getCapabilities</a> ()</div>
<div>any <a href="#SystemInfo::getCapability">getCapability</a> (DOMString key)</div>
<div>long <a href="#SystemInfo::getCount">getCount</a> (<a href="#SystemInfoPropertyId">SystemInfoPropertyId</a> property)</div>
<div>void <a href="#SystemInfo::getPropertyValue">getPropertyValue</a> (<a href="#SystemInfoPropertyId">SystemInfoPropertyId</a> property, <a href="#SystemInfoPropertySuccessCallback">SystemInfoPropertySuccessCallback</a> successCallback, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback)</div>
</td>
</tr>
<tr>
-<td class="deprecated"><a href="#SystemInfoDeviceCapability">SystemInfoDeviceCapability</a></td>
-<td></td>
-</tr>
-<tr>
<td><a href="#SystemInfoOptions">SystemInfoOptions</a></td>
<td></td>
</tr>
long long getAvailableMemory() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
- <a href="#SystemInfoDeviceCapability">SystemInfoDeviceCapability</a> getCapabilities() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
-
any getCapability(DOMString key) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
long getCount(<a href="#SystemInfoPropertyId">SystemInfoPropertyId</a> property) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
deviceCapabilities = tizen.systeminfo.getCapabilities();
if (deviceCapabilities.bluetooth)
{
- console.log("Bluetooth is supported");
+ console.log("Bluetooth is supported");
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
try
{
- /* Checks if a device supports bluetooth API */
- var bluetooth = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth");
- console.log(" Bluetooth = " + bluetooth);
+ /* Checks if a device supports bluetooth API */
+ 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);
+ console.log("Error name: " + error.name + ", message: " + error.message);
}
</pre>
</div>
var count = tizen.systeminfo.getCount("SIM");
if (count === 0)
{
- console.log("There is no available SIM card.");
+ console.log("There is no available SIM card.");
}
else
{
- console.log("There is(are) " + count + " SIM card(s) available.");
+ console.log("There is(are) " + count + " SIM card(s) available.");
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onSuccessCallback(cpu)
{
- console.log("The cpu load is " + cpu.load);
+ console.log("The cpu load is " + cpu.load);
}
function onErrorCallback(error)
{
- console.log("An error occurred " + error.message);
+ console.log("An error occurred " + error.message);
}
tizen.systeminfo.getPropertyValue("CPU", onSuccessCallback, onErrorCallback);
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onSuccessCallback(cellular)
{
- console.log("The status of the cellular network is " + cellular.status);
+ 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 is passed */
+ console.log("An error occurred " + error.message);
+ /* If telephony_capability is false but getPropertyValue("CELLULAR_NETWORK, ..) is called, NotSupportedError is 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);
+ /* 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.");
+ console.log("Telephony feature is not supported. Cellular network related information cannot be retrieved.");
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function successCB(property)
{
- console.log("The SIM's current state is " + property.state);
+ 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);
- }
+ 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.");
+ console.log("This device does not provide SIM card.");
}
else if (count > 1)
{
- tizen.systeminfo.getPropertyValueArray("SIM", successArrayCB);
+ tizen.systeminfo.getPropertyValueArray("SIM", successArrayCB);
}
else
{
- tizen.systeminfo.getPropertyValue("SIM", successCB);
+ tizen.systeminfo.getPropertyValue("SIM", successCB);
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onSuccessCallback(cpu)
{
- console.log("The cpu load: " + cpu.load);
+ console.log("The cpu load: " + cpu.load);
}
tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback, {lowThreshold: 0.2});
var id = null;
function onSuccessCallback(cpu)
{
- console.log("New value for CPU load is " + cpu.load);
- if (id != null)
- {
- /* After receiving the first notification, clear it */
- tizen.systeminfo.removePropertyValueChangeListener(id);
- }
+ console.log("New value for CPU load is " + cpu.load);
+ if (id != null)
+ {
+ /* After receiving the first notification, clear it */
+ tizen.systeminfo.removePropertyValueChangeListener(id);
+ }
}
id = tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback);
readonly attribute boolean isRemovable;
- readonly attribute boolean isRemoveable;
};</pre>
<div class="attributes">
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
tizen.systeminfo.getPropertyValue("CAMERA_FLASH", function(flash)
{
- console.log("Flash brightness is set to: " + (flash.brightness * 100).toFixed(0) + "%");
-}, function(error)
+ console.log("Flash brightness is set to: " + (flash.brightness * 100).toFixed(0) + "%");
+},
+function(error)
{
- console.log("Error, name: " + error.name + ", message: " + error.message);
+ console.log("Error, name: " + error.name + ", message: " + error.message);
});
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
tizen.systeminfo.getPropertyValue("CAMERA_FLASH", function(flash)
{
- try
- {
- flash.setBrightness(1);
- }
- catch (error)
- {
- console.log("Setting flash brightness failed: " + error.message);
- }
-}, function(error)
+ 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);
+ console.log("Error, name: " + error.name + ", message: " + error.message);
});
</pre>
</div>
long long getAvailableMemory() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
- <a href="#SystemInfoDeviceCapability">SystemInfoDeviceCapability</a> getCapabilities() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
-
any getCapability(DOMString key) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
long getCount(<a href="#SystemInfoPropertyId">SystemInfoPropertyId</a> property) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
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 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;
- };
-
dictionary SystemInfoOptions {
unsigned long timeout;
readonly attribute boolean isRemovable;
- readonly attribute boolean isRemoveable;
};
[NoInterfaceObject] interface SystemInfoDisplay : SystemInfoProperty {
VIDEOSOURCE (<b>Since</b>: 2.3) </li>
<li>
WIFI_NETWORK </li>
+ <li>
+ADS (<b>Since</b>: 3.0) </li>
</ul>
<p>
Not all above properties may be available on every Tizen device. For instance, a device may not support the telephony feature. In that case, <var>CELLULAR_NETWORK</var> and <var>SIM</var> are not available.<br><br>To check the available <var>SystemInfoPropertyId</var>, <em>tizen.systeminfo.getCapability()</em> can be used.
<td>
<div>long long <a href="#SystemInfo::getTotalMemory">getTotalMemory</a> ()</div>
<div>long long <a href="#SystemInfo::getAvailableMemory">getAvailableMemory</a> ()</div>
-<div class="deprecated">
-<a href="#SystemInfoDeviceCapability">SystemInfoDeviceCapability</a> <a href="#SystemInfo::getCapabilities">getCapabilities</a> ()</div>
<div>any <a href="#SystemInfo::getCapability">getCapability</a> (DOMString key)</div>
<div>long <a href="#SystemInfo::getCount">getCount</a> (<a href="#SystemInfoPropertyId">SystemInfoPropertyId</a> property)</div>
<div>void <a href="#SystemInfo::getPropertyValue">getPropertyValue</a> (<a href="#SystemInfoPropertyId">SystemInfoPropertyId</a> property, <a href="#SystemInfoPropertySuccessCallback">SystemInfoPropertySuccessCallback</a> successCallback, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback)</div>
</td>
</tr>
<tr>
-<td class="deprecated"><a href="#SystemInfoDeviceCapability">SystemInfoDeviceCapability</a></td>
-<td></td>
-</tr>
-<tr>
<td><a href="#SystemInfoOptions">SystemInfoOptions</a></td>
<td></td>
</tr>
long long getAvailableMemory() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
- <a href="#SystemInfoDeviceCapability">SystemInfoDeviceCapability</a> getCapabilities() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
-
any getCapability(DOMString key) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
long getCount(<a href="#SystemInfoPropertyId">SystemInfoPropertyId</a> property) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
deviceCapabilities = tizen.systeminfo.getCapabilities();
if (deviceCapabilities.bluetooth)
{
- console.log("Bluetooth is supported");
+ console.log("Bluetooth is supported");
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
try
{
- /* Checks if a device supports bluetooth API */
- var bluetooth = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth");
- console.log(" Bluetooth = " + bluetooth);
+ /* Checks if a device supports bluetooth API */
+ 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);
+ console.log("Error name: " + error.name + ", message: " + error.message);
}
</pre>
</div>
var count = tizen.systeminfo.getCount("SIM");
if (count === 0)
{
- console.log("There is no available SIM card.");
+ console.log("There is no available SIM card.");
}
else
{
- console.log("There is(are) " + count + " SIM card(s) available.");
+ console.log("There is(are) " + count + " SIM card(s) available.");
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onSuccessCallback(cpu)
{
- console.log("The cpu load is " + cpu.load);
+ console.log("The cpu load is " + cpu.load);
}
function onErrorCallback(error)
{
- console.log("An error occurred " + error.message);
+ console.log("An error occurred " + error.message);
}
tizen.systeminfo.getPropertyValue("CPU", onSuccessCallback, onErrorCallback);
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onSuccessCallback(cellular)
{
- console.log("The status of the cellular network is " + cellular.status);
+ 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 is passed */
+ console.log("An error occurred " + error.message);
+ /* If telephony_capability is false but getPropertyValue("CELLULAR_NETWORK, ..) is called, NotSupportedError is 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);
+ /* 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.");
+ console.log("Telephony feature is not supported. Cellular network related information cannot be retrieved.");
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function successCB(property)
{
- console.log("The SIM's current state is " + property.state);
+ 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);
- }
+ 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.");
+ console.log("This device does not provide SIM card.");
}
else if (count > 1)
{
- tizen.systeminfo.getPropertyValueArray("SIM", successArrayCB);
+ tizen.systeminfo.getPropertyValueArray("SIM", successArrayCB);
}
else
{
- tizen.systeminfo.getPropertyValue("SIM", successCB);
+ tizen.systeminfo.getPropertyValue("SIM", successCB);
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onSuccessCallback(cpu)
{
- console.log("The cpu load: " + cpu.load);
+ console.log("The cpu load: " + cpu.load);
}
tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback, {lowThreshold: 0.2});
var id = null;
function onSuccessCallback(cpu)
{
- console.log("New value for CPU load is " + cpu.load);
- if (id != null)
- {
- /* After receiving the first notification, clear it */
- tizen.systeminfo.removePropertyValueChangeListener(id);
- }
+ console.log("New value for CPU load is " + cpu.load);
+ if (id != null)
+ {
+ /* After receiving the first notification, clear it */
+ tizen.systeminfo.removePropertyValueChangeListener(id);
+ }
}
id = tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback);
SystemInfoDeviceCapability object.
</div>
<p class="deprecated"><b>Deprecated.</b>
- SystemInfoDeviceCapability is deprecated since Tizen 2.3 and will be removed in Tizen 3.0.
-It is recommended to use the getCapability() method (since Tizen 2.3) instead to query device capabilities.
+ Deprecated since 2.3. Instead, use getCapability() to query device capabilities.
</p>
<pre class="webidl prettyprint"> [NoInterfaceObject] interface SystemInfoDeviceCapability {
readonly attribute boolean bluetooth;
readonly attribute boolean isRemovable;
- readonly attribute boolean isRemoveable;
};</pre>
<div class="attributes">
true if this unit can be removed from the system (such as an sdcard unplugged), false otherwise.
</div>
<p class="deprecated"><b>Deprecated.</b>
- A typographic error.
+ Deprecated since 2.1. Instead, use isRemovable.
</p>
<p><span class="version">
Since: </span>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
tizen.systeminfo.getPropertyValue("CAMERA_FLASH", function(flash)
{
- console.log("Flash brightness is set to: " + (flash.brightness * 100).toFixed(0) + "%");
-}, function(error)
+ console.log("Flash brightness is set to: " + (flash.brightness * 100).toFixed(0) + "%");
+},
+function(error)
{
- console.log("Error, name: " + error.name + ", message: " + error.message);
+ console.log("Error, name: " + error.name + ", message: " + error.message);
});
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
tizen.systeminfo.getPropertyValue("CAMERA_FLASH", function(flash)
{
- try
- {
- flash.setBrightness(1);
- }
- catch (error)
- {
- console.log("Setting flash brightness failed: " + error.message);
- }
-}, function(error)
+ 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);
+ console.log("Error, name: " + error.name + ", message: " + error.message);
});
</pre>
</div>
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 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;
- };
-
dictionary SystemInfoOptions {
unsigned long timeout;
readonly attribute boolean isRemovable;
- readonly attribute boolean isRemoveable;
};
[NoInterfaceObject] interface SystemInfoDisplay : SystemInfoProperty {
<td>
<div>long long <a href="#SystemInfo::getTotalMemory">getTotalMemory</a> ()</div>
<div>long long <a href="#SystemInfo::getAvailableMemory">getAvailableMemory</a> ()</div>
-<div class="deprecated">
-<a href="#SystemInfoDeviceCapability">SystemInfoDeviceCapability</a> <a href="#SystemInfo::getCapabilities">getCapabilities</a> ()</div>
<div>any <a href="#SystemInfo::getCapability">getCapability</a> (DOMString key)</div>
<div>long <a href="#SystemInfo::getCount">getCount</a> (<a href="#SystemInfoPropertyId">SystemInfoPropertyId</a> property)</div>
<div>void <a href="#SystemInfo::getPropertyValue">getPropertyValue</a> (<a href="#SystemInfoPropertyId">SystemInfoPropertyId</a> property, <a href="#SystemInfoPropertySuccessCallback">SystemInfoPropertySuccessCallback</a> successCallback, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback)</div>
</td>
</tr>
<tr>
-<td class="deprecated"><a href="#SystemInfoDeviceCapability">SystemInfoDeviceCapability</a></td>
-<td></td>
-</tr>
-<tr>
<td><a href="#SystemInfoOptions">SystemInfoOptions</a></td>
<td></td>
</tr>
long long getAvailableMemory() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
- <a href="#SystemInfoDeviceCapability">SystemInfoDeviceCapability</a> getCapabilities() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
-
any getCapability(DOMString key) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
long getCount(<a href="#SystemInfoPropertyId">SystemInfoPropertyId</a> property) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
deviceCapabilities = tizen.systeminfo.getCapabilities();
if (deviceCapabilities.bluetooth)
{
- console.log("Bluetooth is supported");
+ console.log("Bluetooth is supported");
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
try
{
- /* Checks if a device supports bluetooth API */
- var bluetooth = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth");
- console.log(" Bluetooth = " + bluetooth);
+ /* Checks if a device supports bluetooth API */
+ 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);
+ console.log("Error name: " + error.name + ", message: " + error.message);
}
</pre>
</div>
var count = tizen.systeminfo.getCount("SIM");
if (count === 0)
{
- console.log("There is no available SIM card.");
+ console.log("There is no available SIM card.");
}
else
{
- console.log("There is(are) " + count + " SIM card(s) available.");
+ console.log("There is(are) " + count + " SIM card(s) available.");
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onSuccessCallback(cpu)
{
- console.log("The cpu load is " + cpu.load);
+ console.log("The cpu load is " + cpu.load);
}
function onErrorCallback(error)
{
- console.log("An error occurred " + error.message);
+ console.log("An error occurred " + error.message);
}
tizen.systeminfo.getPropertyValue("CPU", onSuccessCallback, onErrorCallback);
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onSuccessCallback(cellular)
{
- console.log("The status of the cellular network is " + cellular.status);
+ 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 is passed */
+ console.log("An error occurred " + error.message);
+ /* If telephony_capability is false but getPropertyValue("CELLULAR_NETWORK, ..) is called, NotSupportedError is 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);
+ /* 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.");
+ console.log("Telephony feature is not supported. Cellular network related information cannot be retrieved.");
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function successCB(property)
{
- console.log("The SIM's current state is " + property.state);
+ 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);
- }
+ 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.");
+ console.log("This device does not provide SIM card.");
}
else if (count > 1)
{
- tizen.systeminfo.getPropertyValueArray("SIM", successArrayCB);
+ tizen.systeminfo.getPropertyValueArray("SIM", successArrayCB);
}
else
{
- tizen.systeminfo.getPropertyValue("SIM", successCB);
+ tizen.systeminfo.getPropertyValue("SIM", successCB);
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onSuccessCallback(cpu)
{
- console.log("The cpu load: " + cpu.load);
+ console.log("The cpu load: " + cpu.load);
}
tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback, {lowThreshold: 0.2});
var id = null;
function onSuccessCallback(cpu)
{
- console.log("New value for CPU load is " + cpu.load);
- if (id != null)
- {
- /* After receiving the first notification, clear it */
- tizen.systeminfo.removePropertyValueChangeListener(id);
- }
+ console.log("New value for CPU load is " + cpu.load);
+ if (id != null)
+ {
+ /* After receiving the first notification, clear it */
+ tizen.systeminfo.removePropertyValueChangeListener(id);
+ }
}
id = tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback);
readonly attribute boolean isRemovable;
- readonly attribute boolean isRemoveable;
};</pre>
<div class="attributes">
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
tizen.systeminfo.getPropertyValue("CAMERA_FLASH", function(flash)
{
- console.log("Flash brightness is set to: " + (flash.brightness * 100).toFixed(0) + "%");
-}, function(error)
+ console.log("Flash brightness is set to: " + (flash.brightness * 100).toFixed(0) + "%");
+},
+function(error)
{
- console.log("Error, name: " + error.name + ", message: " + error.message);
+ console.log("Error, name: " + error.name + ", message: " + error.message);
});
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
tizen.systeminfo.getPropertyValue("CAMERA_FLASH", function(flash)
{
- try
- {
- flash.setBrightness(1);
- }
- catch (error)
- {
- console.log("Setting flash brightness failed: " + error.message);
- }
-}, function(error)
+ 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);
+ console.log("Error, name: " + error.name + ", message: " + error.message);
});
</pre>
</div>
long long getAvailableMemory() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
- <a href="#SystemInfoDeviceCapability">SystemInfoDeviceCapability</a> getCapabilities() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
-
any getCapability(DOMString key) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
long getCount(<a href="#SystemInfoPropertyId">SystemInfoPropertyId</a> property) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
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 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;
- };
-
dictionary SystemInfoOptions {
unsigned long timeout;
readonly attribute boolean isRemovable;
- readonly attribute boolean isRemoveable;
};
[NoInterfaceObject] interface SystemInfoDisplay : SystemInfoProperty {