From: Adam Szczerbiak
Date: Tue, 26 Jan 2016 07:42:13 +0000 (+0100)
Subject: [JIRA #937] sensor API doc update
X-Git-Tag: tizen_3.0/TD_SYNC/20161201~179^2
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bef0dc17b69acb1def6e2cf37fa0facdc5ebe68f;p=sdk%2Fonline-doc.git
[JIRA #937] sensor API doc update
This commit updates the API documentation for Sensor module in both
mobile and wearable branches, so that they reflect widl spec file.
Change-Id: I7752ccb5277820edc8e03e65ebed44df3bdd5ce4
Signed-off-by: Adam Szczerbiak
---
diff --git a/org.tizen.web.apireference/html/device_api/mobile/tizen/sensor.html b/org.tizen.web.apireference/html/device_api/mobile/tizen/sensor.html
index 81d18ec..942d751 100644
--- a/org.tizen.web.apireference/html/device_api/mobile/tizen/sensor.html
+++ b/org.tizen.web.apireference/html/device_api/mobile/tizen/sensor.html
@@ -518,7 +518,7 @@ The supported sensor types are hardware-dependent.
To check if the given
- Registers a change listener to be called when sensor data of the given type changes.
+Registers a change listener to retrieve sensor data periodically.
@@ -532,16 +532,20 @@ Note that the setChangeListener() method only registers the listener.
The start() method must be called to turn on the sensor, or the sensor data will not change.
+interval is supported since Tizen 2.3.2
Parameters:
-
successCallback:
- Callback method to be invoked when the sensor data changes
+ Callback method to be invoked periodically.
-
- interval [optional]:
- The period in milliseconds at which events are invoked. Valid values are integers in range <10, 1000> inclusively. The default value is 100.
+ interval
+ [optional] [nullable]:
+ The period in milliseconds at which sensor data will be sent to the application which calls this method.
+ interval should be in range <10, 1000> inclusively. However, if it is null or zero, it will be set to the default value of 100 ms.
+For the PROXIMITY sensor type, interval will be ignored.
@@ -554,6 +558,9 @@ The start() method must be called to turn on the sensor, or the sensor data will
with error type UnknownError, if registering the listener fails because of an unknown error.
+
+ with error type InvalidValuesError, if any of the input parameters contain an invalid value.
+
diff --git a/org.tizen.web.apireference/html/device_api/wearable/tizen/sensor.html b/org.tizen.web.apireference/html/device_api/wearable/tizen/sensor.html
index c0f8c60..068805c 100644
--- a/org.tizen.web.apireference/html/device_api/wearable/tizen/sensor.html
+++ b/org.tizen.web.apireference/html/device_api/wearable/tizen/sensor.html
@@ -532,16 +532,20 @@ Note that the setChangeListener() method only registers the listener.
The start() method must be called to turn on the sensor, or the sensor data will not change.
+interval is supported since Tizen 2.3.2
Parameters:
-
successCallback:
- Callback method to be invoked when the sensor data changes
+ Callback method to be invoked periodically.
-
-interval [optional]:
-The period in milliseconds at which events are invoked. Valid values are integers in range <10, 1000> inclusively. The default value is 100.
+interval
+ [optional] [nullable]:
+The period in milliseconds at which sensor data will be sent to the application which calls this method.
+ interval should be in range <10, 1000> inclusively. However, if it is null or zero, it will be set to the default value of 100 ms.
+For the PROXIMITY sensor type, interval will be ignored.
@@ -554,12 +558,14 @@ The period in milliseconds at which events are invoked. Valid values are integer
with error type UnknownError, if registering the listener fails because of an unknown error.
+
+ with error type InvalidValuesError, if any of the input parameters contain an invalid value.
+
-
-
-Code example:
+
+
Code example:
var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
function onsuccessCB() {
@@ -594,7 +600,6 @@ The period in milliseconds at which events are invoked. Valid values are integer
lightSensor.start(onSuccessCB);
-
unsetChangeListener