Get current human activity monitor data </li>
<li>
Record and read human activity data </li>
+ <li>
+Recognize activities and gestures </li>
</ul>
<p>
+The gesture recognition API allows applications to be notified and react when the user performs different types of gestures, for example, when the device was tapped, shaken up, picked up or moved along axis.
+ </p>
+ <p>
+The activity recognition API allows applications to be notified and react when a user activity is recognized, for example, the user starts to run, walk or is in moving vehicle.
+ </p>
+ <p>
For more information about how to use Human Activity Monitor API, see <a href="https://developer.tizen.org/development/guides/web-application/tizen-features/system/human-activity-monitor">Human Activity Monitor Guide</a>.
</p>
</div>
<h2>Table of Contents</h2>
<ul class="toc">
<li>1. <a href="#typedefs-section">Type Definitions</a><ul class="toc">
-<li>
+<li class="deprecated">
1.1. <a href="#HumanActivityType">HumanActivityType</a>
</li>
<li>
<li>
1.6. <a href="#SleepStatus">SleepStatus</a>
</li>
+<li>
+ 1.7. <a href="#GestureType">GestureType</a>
+</li>
+<li>
+ 1.8. <a href="#GestureEvent">GestureEvent</a>
+</li>
</ul>
</li>
<li>2. <a href="#interfaces-section">Interfaces</a><ul class="toc">
</li>
<li>2.19. <a href="#HumanActivityRecorderPressureData">HumanActivityRecorderPressureData</a>
</li>
-<li>2.20. <a href="#HumanActivityMonitorSuccessCallback">HumanActivityMonitorSuccessCallback</a>
+<li>2.20. <a href="#GestureData">GestureData</a>
</li>
-<li>2.21. <a href="#HumanActivityReadRecorderSuccessCallback">HumanActivityReadRecorderSuccessCallback</a>
+<li>2.21. <a href="#HumanActivityMonitorSuccessCallback">HumanActivityMonitorSuccessCallback</a>
+</li>
+<li>2.22. <a href="#HumanActivityReadRecorderSuccessCallback">HumanActivityReadRecorderSuccessCallback</a>
+</li>
+<li>2.23. <a href="#GestureRecognitionCallback">GestureRecognitionCallback</a>
</li>
</ul>
</li>
<div>void <a href="#HumanActivityMonitorManager::startRecorder">startRecorder</a> (<a href="#HumanActivityRecorderType">HumanActivityRecorderType</a> type, optional <a href="#HumanActivityRecorderOption">HumanActivityRecorderOption</a> option)</div>
<div>void <a href="#HumanActivityMonitorManager::stopRecorder">stopRecorder</a> (<a href="#HumanActivityRecorderType">HumanActivityRecorderType</a> type)</div>
<div>void <a href="#HumanActivityMonitorManager::readRecorderData">readRecorderData</a> (<a href="#HumanActivityRecorderType">HumanActivityRecorderType</a> type, <a href="#HumanActivityRecorderQuery">HumanActivityRecorderQuery</a>? query, <a href="#HumanActivityReadRecorderSuccessCallback">HumanActivityReadRecorderSuccessCallback</a> successCallback, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback)</div>
+<div>boolean <a href="#HumanActivityMonitorManager::isGestureSupported">isGestureSupported</a> (<a href="#GestureType">GestureType</a> type)</div>
+<div>long <a href="#HumanActivityMonitorManager::addGestureRecognitionListener">addGestureRecognitionListener</a> (<a href="#GestureType">GestureType</a> type, <a href="#GestureRecognitionCallback">GestureRecognitionCallback</a> listener, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback, optional boolean? alwaysOn)</div>
+<div>void <a href="#HumanActivityMonitorManager::removeGestureRecognitionListener">removeGestureRecognitionListener</a> (long watchId)</div>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
+<td><a href="#GestureData">GestureData</a></td>
+<td></td>
+</tr>
+<tr>
<td><a href="#HumanActivityMonitorSuccessCallback">HumanActivityMonitorSuccessCallback</a></td>
<td><div>void <a href="#HumanActivityMonitorSuccessCallback::onsuccess">onsuccess</a> (optional <a href="#HumanActivityData">HumanActivityData</a>? humanactivitydata)</div></td>
</tr>
<td><a href="#HumanActivityReadRecorderSuccessCallback">HumanActivityReadRecorderSuccessCallback</a></td>
<td><div>void <a href="#HumanActivityReadRecorderSuccessCallback::onsuccess">onsuccess</a> (<a href="#HumanActivityRecorderData">HumanActivityRecorderData</a>[] humanactivitydata)</div></td>
</tr>
+<tr>
+<td><a href="#GestureRecognitionCallback">GestureRecognitionCallback</a></td>
+<td><div>void <a href="#GestureRecognitionCallback::onsuccess">onsuccess</a> (<a href="#GestureData">GestureData</a> data)</div></td>
+</tr>
</tbody>
</table>
<div class="typedefs" id="typedefs-section">
<h2>1. Type Definitions</h2>
-<div class="enum" id="HumanActivityType">
+<div class="enum deprecated" id="HumanActivityType">
<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityType"></a><h3>1.1. HumanActivityType</h3>
<div class="brief">
Specifies the supported human activity monitor types.
</div>
+<p class="deprecated"><b>Deprecated.</b>
+ <em>WRIST_UP</em> is deprecated since Tizen 4.0. Use <em>GestureType</em> and <a href="#HumanActivityMonitorManager::addGestureRecognitionListener">addGestureRecognitionListener</a> to monitor <em>WRIST_UP</em> gesture.
+ </p>
<pre class="webidl prettyprint"> enum HumanActivityType { "PEDOMETER", "WRIST_UP", "HRM", "GPS", "SLEEP_MONITOR" };</pre>
<p><span class="version">
Since: </span>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onchangedCB(sleepInfo)
{
- console.log("Sleep status: " + sleepInfo.status);
- console.log("Timestamp: " + sleepInfo.timestamp);
+ console.log("Sleep status: " + sleepInfo.status);
+ console.log("Timestamp: " + sleepInfo.timestamp);
}
tizen.humanactivitymonitor.start("SLEEP_MONITOR", onchangedCB);
</pre>
</div>
</div>
+<div class="enum" id="GestureType">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::GestureType"></a><h3>1.7. GestureType</h3>
+<div class="brief">
+ Specifies the gesture types.
+ </div>
+<pre class="webidl prettyprint"> enum GestureType { "GESTURE_DOUBLE_TAP", "GESTURE_MOVE_TO_EAR", "GESTURE_NO_MOVE", "GESTURE_PICK_UP",
+ "GESTURE_SHAKE", "GESTURE_SNAP", "GESTURE_TILT", "GESTURE_TURN_FACE_DOWN", "GESTURE_WRIST_UP" };</pre>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="description">
+ <ul>
+ <li>
+GESTURE_DOUBLE_TAP - The display of the mobile device is tapped twice </li>
+ <li>
+GESTURE_MOVE_TO_EAR - The mobile device is moved near to an ear </li>
+ <li>
+GESTURE_NO_MOVE - The mobile device is being stopped for a while </li>
+ <li>
+GESTURE_PICK_UP - The mobile device is picked up </li>
+ <li>
+GESTURE_SHAKE - The mobile device is quickly moved back and forth </li>
+ <li>
+GESTURE_SNAP - The mobile device is moved along an axis and back </li>
+ <li>
+GESTURE_TILT - The mobile device is tilted </li>
+ <li>
+GESTURE_TURN_FACE_DOWN - The mobile device is flipped from face to back </li>
+ <li>
+GESTURE_WRIST_UP - The wearable device is moved and faced up </li>
+ </ul>
+ </div>
+</div>
+<div class="enum" id="GestureEvent">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::GestureEvent"></a><h3>1.8. GestureEvent</h3>
+<div class="brief">
+ Specifies the gesture events.
+ </div>
+<pre class="webidl prettyprint"> enum GestureEvent { "GESTURE_EVENT_DETECTED", "GESTURE_SHAKE_DETECTED", "GESTURE_SHAKE_FINISHED", "GESTURE_SNAP_X_NEGATIVE",
+ "GESTURE_SNAP_X_POSITIVE", "GESTURE_SNAP_Y_NEGATIVE", "GESTURE_SNAP_Y_POSITIVE", "GESTURE_SNAP_Z_NEGATIVE", "GESTURE_SNAP_Z_POSITIVE" };</pre>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="description">
+ <ul>
+ <li>
+GESTURE_EVENT_DETECTED - The gesture is detected </li>
+ <li>
+GESTURE_SHAKE_DETECTED - Shake gesture is detected </li>
+ <li>
+GESTURE_SHAKE_FINISHED - Shake gesture is finished </li>
+ <li>
+GESTURE_SNAP_X_NEGATIVE - [-X] snap is detected </li>
+ <li>
+GESTURE_SNAP_X_POSITIVE - [+X] snap is detected </li>
+ <li>
+GESTURE_SNAP_Y_NEGATIVE - [-Y] snap is detected </li>
+ <li>
+GESTURE_SNAP_Y_POSITIVE - [+Y] snap is detected </li>
+ <li>
+GESTURE_SNAP_Z_NEGATIVE - [-Z] snap is detected </li>
+ <li>
+GESTURE_SNAP_Z_POSITIVE - [+Z] snap is detected </li>
+ </ul>
+ </div>
+</div>
</div>
<div class="interfaces" id="interfaces-section">
<h2>2. Interfaces</h2>
HumanActivityRecorderQuery? query,
HumanActivityReadRecorderSuccessCallback successCallback,
optional ErrorCallback? errorCallback) raises(WebAPIException);
+
+ boolean isGestureSupported(GestureType type) raises(WebAPIException);
+ long addGestureRecognitionListener(GestureType type, GestureRecognitionCallback listener, optional ErrorCallback? errorCallback, optional boolean? alwaysOn) raises(WebAPIException);
+ void removeGestureRecognitionListener(long watchId) raises(WebAPIException);
};</pre>
<p><span class="version">
Since: </span>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onsuccessCB(pedometerInfo)
{
- console.log("Step status: " + pedometerInfo.stepStatus);
- console.log("Cumulative total step count: " + pedometerInfo.cumulativeTotalStepCount);
+ console.log("Step status: " + pedometerInfo.stepStatus);
+ console.log("Cumulative total step count: " + pedometerInfo.cumulativeTotalStepCount);
}
function onerrorCB(error)
{
- console.log("Error occurs. name:" + error.name + ", message: " + error.message);
+ console.log("Error occurs. name:" + error.name + ", message: " + error.message);
}
function onchangedCB(pedometerdata)
{
- console.log("From now on, you will be notified when the pedometer data changes.");
- /* To get the current data information */
- tizen.humanactivitymonitor.getHumanActivityData("PEDOMETER", onsuccessCB, onerrorCB);
+ console.log("From now on, you will be notified when the pedometer data changes.");
+ /* To get the current data information */
+ tizen.humanactivitymonitor.getHumanActivityData("PEDOMETER", onsuccessCB, onerrorCB);
}
tizen.humanactivitymonitor.start("PEDOMETER", onchangedCB);
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onchangedCB(pedometerInfo)
{
- console.log("Step status: " + pedometerInfo.stepStatus);
- console.log("Cumulative total step count: " + pedometerInfo.cumulativeTotalStepCount);
+ console.log("Step status: " + pedometerInfo.stepStatus);
+ console.log("Cumulative total step count: " + pedometerInfo.cumulativeTotalStepCount);
}
tizen.humanactivitymonitor.start("PEDOMETER", onchangedCB);
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onchangedCB(info)
{
- var gpsInfo = info.gpsInfo;
- for (var index = 0; index < gpsInfo.length; index++)
- {
- console.log("latitude: " + gpsInfo[index].latitude);
- console.log("longitude: " + gpsInfo[index].longitude);
- }
+ var gpsInfo = info.gpsInfo;
+ for (var index = 0; index < gpsInfo.length; index++)
+ {
+ console.log("latitude: " + gpsInfo[index].latitude);
+ console.log("longitude: " + gpsInfo[index].longitude);
+ }
}
function onerrorCB(error)
{
- console.log("Error occurred. Name:" + error.name + ", message: " + error.message);
+ console.log("Error occurred. Name:" + error.name + ", message: " + error.message);
}
try
{
- tizen.humanactivitymonitor.start("GPS", onchangedCB, onerrorCB, {callbackInterval: 150000, sampleInterval: 1000});
+ tizen.humanactivitymonitor.start("GPS", onchangedCB, onerrorCB,
+ {callbackInterval: 150000, sampleInterval: 1000});
}
catch (err)
{
- console.log(err.name + ": " + err.message);
+ console.log(err.name + ": " + err.message);
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onchangedCB(pedometerInfo)
{
- console.log("Step status: " + pedometerInfo.stepStatus);
- console.log("Accumulative total step count: " + pedometerInfo.accumulativeTotalStepCount);
+ console.log("Step status: " + pedometerInfo.stepStatus);
+ console.log("Accumulative total step count: " + pedometerInfo.accumulativeTotalStepCount);
}
tizen.humanactivitymonitor.setAccumulativePedometerListener(onchangedCB);
</li></ul>
</div>
<div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">tizen.humanactivitymonitor.unsetAccumulativePedometerListener();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.humanactivitymonitor.unsetAccumulativePedometerListener();
</pre>
</div>
</dd>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function errorCallback(error)
{
- console.log(error.name + ': ' + error.message);
+ console.log(error.name + ": " + error.message);
}
function listener(info)
{
- console.log('type: ' + info.type);
- console.log('timestamp: ' + info.timestamp);
- console.log('accuracy: ' + info.accuracy);
+ console.log("type: " + info.type);
+ console.log("timestamp: " + info.timestamp);
+ console.log("accuracy: " + info.accuracy);
}
try
{
- var listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
+ var listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
}
catch (error)
{
- console.log(error.name + ': ' + error.message);
+ console.log(error.name + ": " + error.message);
}
</pre>
</div>
function errorCallback(error)
{
- console.log(error.name + ': ' + error.message);
+ console.log(error.name + ": " + error.message);
}
function listener(info)
{
- console.log('type: ' + info.type);
- console.log('timestamp: ' + info.timestamp);
- console.log('accuracy: ' + info.accuracy);
+ console.log("type: " + info.type);
+ console.log("timestamp: " + info.timestamp);
+ console.log("accuracy: " + info.accuracy);
- tizen.humanactivitymonitor.removeActivityRecognitionListener(listenerId, errorCallback);
+ tizen.humanactivitymonitor.removeActivityRecognitionListener(listenerId, errorCallback);
}
try
{
- listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
+ listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
}
catch (error)
{
- console.log(error.name + ': ' + error.message);
+ console.log(error.name + ": " + error.message);
}
</pre>
</div>
with error type AbortError, if the system operation was aborted.
</p></li>
<li class="list"><p>
+ with error type ServiceNotAvailableError, if the human activity recorder type is already started by any application of a package.
+ </p></li>
+<li class="list"><p>
with error type InvalidValuesError, if any of the input parameters contain an invalid value.
</p></li>
</ul>
</div>
<div class="example">
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
-var type = 'PRESSURE';
+var type = "PRESSURE";
var options =
{
- retentionPeriod: 1 /* 1 hour */
+ retentionPeriod: 1 /* 1 hour */
};
+
try
{
- tizen.humanactivitymonitor.startRecorder(type, options);
+ tizen.humanactivitymonitor.startRecorder(type, options);
}
catch (err)
{
- console.log(err.name + ': ' + err.message);
+ console.log(err.name + ": " + err.message);
}
</pre>
</div>
</div>
<div class="example">
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
-var type = 'PRESSURE';
+var type = "PRESSURE";
try
{
- tizen.humanactivitymonitor.startRecorder(type);
+ tizen.humanactivitymonitor.startRecorder(type);
+ /* Do something */
- /* Do something */
-
- tizen.humanactivitymonitor.stopRecorder(type);
+ tizen.humanactivitymonitor.stopRecorder(type);
}
catch (err)
{
- console.log(err.name + ': ' + err.message);
+ console.log(err.name + ": " + err.message);
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onerror(error)
{
- console.log(error.name + ": " + error.message);
+ console.log(error.name + ": " + error.message);
}
function onread(data)
{
- for (var idx = 0; idx < data.length; ++idx)
- {
- console.log('startTime: ' + data[idx].startTime);
- console.log('endTime: ' + data[idx].endTime);
- console.log('calories: ' + data[idx].calorie);
- }
+ for (var idx = 0; idx < data.length; ++idx)
+ {
+ console.log("startTime: " + data[idx].startTime);
+ console.log("endTime: " + data[idx].endTime);
+ console.log("calories: " + data[idx].calorie);
+ }
}
-var type = 'PEDOMETER';
+var type = "PEDOMETER";
var query = {};
try
{
- tizen.humanactivitymonitor.readRecorderData(type, query, onread, onerror);
+ tizen.humanactivitymonitor.readRecorderData(type, query, onread, onerror);
}
catch (err)
{
- console.log(err.name + ': ' + err.message);
+ console.log(err.name + ": " + err.message);
}
</pre>
</div>
</pre>
</div>
</dd>
+<dt class="method" id="HumanActivityMonitorManager::isGestureSupported">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityMonitorManager::isGestureSupported"></a><code><b><span class="methodName">isGestureSupported</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Checks if gesture type is supported on a device.
+ </div>
+<div class="synopsis"><pre class="signature prettyprint">boolean isGestureSupported(<a href="#GestureType">GestureType</a> type);
+ </pre></div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="description">
+ <p>
+This function allows to check whether a gesture type is supported on the current device. Some gestures may not be supported on some devices because of lack necessary sensors.
+ </p>
+ </div>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+ <li class="param">
+<span class="name">type</span>:
+ Gesture type to check if it is supported on a device.
+ </li>
+ </ul>
+</div>
+<div class="returntype">
+<p><span class="return">Return value:</span></p>
+ boolean <em>true</em> if the given gesture type is supported.
+ </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+ <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if input parameter is not compatible with the expected type.
+ </p></li>
+<li class="list"><p>
+ with error type AbortError, if any error occurs.
+ </p></li>
+</ul>
+</li></ul>
+ </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+ var isSupported = tizen.humanactivitymonitor.isGestureSupported("GESTURE_PICK_UP");
+ console.log("GESTURE_PICK_UP is " + (isSupported ? "supported" : "not supported"));
+}
+catch (error)
+{
+ console.log("Error " + error.name + ": " + error.message);
+}
+</pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> GESTURE_PICK_UP is supported.
+ </pre>
+</div>
+</dd>
+<dt class="method" id="HumanActivityMonitorManager::addGestureRecognitionListener">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityMonitorManager::addGestureRecognitionListener"></a><code><b><span class="methodName">addGestureRecognitionListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Adds a listener to be invoked when given gesture type is detected.
+ </div>
+<div class="synopsis"><pre class="signature prettyprint">long addGestureRecognitionListener(<a href="#GestureType">GestureType</a> type, <a href="#GestureRecognitionCallback">GestureRecognitionCallback</a> listener, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback, optional boolean? alwaysOn);
+ </pre></div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="description">
+ <p>
+The <em>ErrorCallback</em> method is launched with this error type:
+ </p>
+ <ul>
+ <li>
+ AbortError : If the system operation was aborted. </li>
+ </ul>
+ </div>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+ <li class="param">
+<span class="name">type</span>:
+ The gesture type to be monitored.
+ </li>
+ <li class="param">
+<span class="name">listener</span>:
+ Listener to be called when gesture is detected or an error occurred.
+ </li>
+ <li class="param">
+<span class="name">errorCallback</span><span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
+ Callback method to be invoked when an error occurs.
+ </li>
+ <li class="param">
+<span class="name">alwaysOn</span><span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
+ The option of the monitored gesture mode. If it is set to <em>false</em> system may try to reduce power consumption, for example by stoping detecting gestures when display is turned off.<br>If it is set to <em>true</em> power-saving functionality is off. Default value is <em>false</em>.
+ </li>
+ </ul>
+</div>
+<div class="returntype">
+<p><span class="return">Return value:</span></p>
+ long The watch ID used to remove the listener.
+ </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+ <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
+ </p></li>
+<li class="list"><p>
+ with error type NotSupportedError, if the gesture recognition is not supported.
+ </p></li>
+<li class="list"><p>
+ with error type IOError, if adding listener failed.
+ </p></li>
+</ul>
+</li></ul>
+ </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function listener(data)
+{
+ console.log("Received " + data.event + " event on " + new Date(data.timestamp * 1000) + " for " + data.type + " type");
+}
+
+function errorCallback(error)
+{
+ console.log(error.name + ": " + error.message);
+}
+
+try
+{
+ var listenerId = tizen.humanactivitymonitor.addGestureRecognitionListener("GESTURE_SHAKE", listener, errorCallback, true);
+ console.log("Listener with id " + listenerId + " has been added");
+}
+catch (error)
+{
+ console.log("Error " + error.name + ": " + error.message);
+}
+</pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Listener with id 1 has been added
+ Received GESTURE_SHAKE_DETECTED event on Thu Sep 01 2016 14:33:56 GMT+0200 (CEST) for GESTURE_SHAKE type
+ </pre>
+</div>
+</dd>
+<dt class="method" id="HumanActivityMonitorManager::removeGestureRecognitionListener">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityMonitorManager::removeGestureRecognitionListener"></a><code><b><span class="methodName">removeGestureRecognitionListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Removes listener with the given id.
+ </div>
+<div class="synopsis"><pre class="signature prettyprint">void removeGestureRecognitionListener(long watchId);
+ </pre></div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+ <li class="param">
+<span class="name">watchId</span>:
+ The ID of the registered listener.
+ </li>
+ </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+ <ul class="exception"><li>WebAPIException<ul><li class="list"><p>
+ with error type AbortError, if system error occurs while removing listener.
+ </p></li></ul>
+</li></ul>
+ </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function listener(data)
+{
+ console.log("Received " + data.event + " event on " + new Date(data.timestamp * 1000) + " for " + data.type + " type");
+}
+
+function errorCallback(error)
+{
+ console.log(error.name + ": " + error.message);
+}
+
+try
+{
+ var listenerId = tizen.humanactivitymonitor.addGestureRecognitionListener("GESTURE_SHAKE", listener, errorCallback);
+ tizen.humanactivitymonitor.removeGestureRecognitionListener(listenerId);
+ console.log("Listener with id " + listenerId + " has been removed");
+}
+catch (error)
+{
+ console.log("Error " + error.name + ": " + error.message);
+}
+</pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Listener with id 1 has been removed
+ </pre>
+</div>
+</dd>
</dl>
</div>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
var option =
{
- interval: 10,
- retentionPeriod: 1
+ interval: 10,
+ retentionPeriod: 1
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onerror(error)
{
- console.log(error.name + ": " + error.message);
+ console.log(error.name + ": " + error.message);
}
function onread(data)
{
- for (var idx = 0; idx < data.length; ++idx)
- {
- console.log("*** " + idx);
- console.log('totalStepCount: ' + data[idx].totalStepCount);
- }
+ for (var idx = 0; idx < data.length; ++idx)
+ {
+ console.log("*** " + idx);
+ console.log("max pressure: " + data[idx].max);
+ console.log("min pressure: " + data[idx].min);
+ console.log("average: " + data[idx].average);
+ }
}
-var type = 'PEDOMETER';
+var type = "PRESSURE";
var now = new Date();
-var startTime = now.setDate(now.getDate() - 7);
+var startTime = now.setDate(now.getDate() - 4);
var anchorTime = (new Date(2000, 1, 2, 6)).getTime();
var query =
{
- startTime: startTime / 1000,
- anchorTime: anchorTime / 1000,
- interval: 1440 /* 1 day */
+ startTime: startTime / 1000,
+ anchorTime: anchorTime / 1000,
+ interval: 1440 /* 1 day */
};
+
try
{
- tizen.humanactivitymonitor.readRecorderData(type, query, onread, onerror);
+ tizen.humanactivitymonitor.readRecorderData(type, query, onread, onerror);
}
catch (err)
{
- console.log(err.name + ': ' + err.message);
+ console.log(err.name + ": " + err.message);
}
</pre>
</div>
<div class="output">
<span class="title"><p>Output example:</p></span><pre> *** 0
- totalStepCount: 3860
+ max pressure: 1013.00
+ min pressure: 930.00
+ average: 980.00
*** 1
- totalStepCount: 6705
+ max pressure: 1012.00
+ min pressure: 954.00
+ average: 986.00
*** 2
- totalStepCount: 4005
+ max pressure: 950.00
+ min pressure: 904.00
+ average: 932.00
*** 3
- totalStepCount: 2328
+ max pressure: 1012.00
+ min pressure: 920.00
+ average: 942.00
*** 4
- totalStepCount: 4705
- *** 5
- totalStepCount: 6446
- *** 6
- totalStepCount: 4103
- *** 7
- totalStepCount: 1456
+ max pressure: 1012.00
+ min pressure: 1005.00
+ average: 1008.00
</pre>
</div>
</dd>
</ul>
</div>
</div>
+<div class="interface" id="GestureData">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::GestureData"></a><h3>2.20. GestureData</h3>
+<div class="brief">
+ The GestureData interface represents detected gesture information.
+ </div>
+<pre class="webidl prettyprint"> [NoInterfaceObject] interface GestureData {
+ readonly attribute <a href="#GestureType">GestureType</a> type;
+ readonly attribute <a href="#GestureEvent">GestureEvent</a> event;
+ readonly attribute long timestamp;
+ readonly attribute double? x;
+ readonly attribute double? y;
+ };</pre>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="attributes">
+<h4>Attributes</h4>
+<ul>
+<li class="attribute" id="GestureData::type">
+<span class="attrName"><span class="readonly"> readonly
+</span><span class="type">GestureType </span><span class="name">type</span></span><div class="brief">
+ Identifier of gesture type.
+ </div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+</li>
+<li class="attribute" id="GestureData::event">
+<span class="attrName"><span class="readonly"> readonly
+</span><span class="type">GestureEvent </span><span class="name">event</span></span><div class="brief">
+ Event type related to the detected gesture.
+ </div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+</li>
+<li class="attribute" id="GestureData::timestamp">
+<span class="attrName"><span class="readonly"> readonly
+</span><span class="type">long </span><span class="name">timestamp</span></span><div class="brief">
+ Time when gesture was detected. Epoch time in seconds.
+ </div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+</li>
+<li class="attribute" id="GestureData::x">
+<span class="attrName"><span class="readonly"> readonly
+</span><span class="type">double </span><span class="name">x</span><span class="optional"> [nullable]</span></span><div class="brief">
+ Tilt degree on X-axis. It is used only for <em>GESTURE_TILT</em> type. For other gesture types it is set to null.
+ </div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+</li>
+<li class="attribute" id="GestureData::y">
+<span class="attrName"><span class="readonly"> readonly
+</span><span class="type">double </span><span class="name">y</span><span class="optional"> [nullable]</span></span><div class="brief">
+ Tilt degree on Y-axis. It is used only for <em>GESTURE_TILT</em> type. For other gesture types it is set to null.
+ </div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+</li>
+</ul>
+</div>
+</div>
<div class="interface" id="HumanActivityMonitorSuccessCallback">
-<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityMonitorSuccessCallback"></a><h3>2.20. HumanActivityMonitorSuccessCallback</h3>
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityMonitorSuccessCallback"></a><h3>2.21. HumanActivityMonitorSuccessCallback</h3>
<div class="brief">
The HumanActivityMonitorSuccessCallback interface is a callback interface that is invoked when new human activity data is available.
</div>
</div>
</div>
<div class="interface" id="HumanActivityReadRecorderSuccessCallback">
-<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityReadRecorderSuccessCallback"></a><h3>2.21. HumanActivityReadRecorderSuccessCallback</h3>
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityReadRecorderSuccessCallback"></a><h3>2.22. HumanActivityReadRecorderSuccessCallback</h3>
<div class="brief">
The HumanActivityReadRecorderSuccessCallback interface is a callback interface that is invoked when recorded human activity data is successfully read.
</div>
</dl>
</div>
</div>
+<div class="interface" id="GestureRecognitionCallback">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::GestureRecognitionCallback"></a><h3>2.23. GestureRecognitionCallback</h3>
+<div class="brief">
+ The GestureRecognitionCallback describes a callback for the addGestureRecognitionListener() method.
+ </div>
+<pre class="webidl prettyprint"> [Callback=FunctionOnly, NoInterfaceObject] interface GestureRecognitionCallback {
+ void onsuccess(<a href="#GestureData">GestureData</a> data);
+ };</pre>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="GestureRecognitionCallback::onsuccess">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::GestureRecognitionCallback::onsuccess"></a><code><b><span class="methodName">onsuccess</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Called when a gesture is detected.
+ </div>
+<div class="synopsis"><pre class="signature prettyprint">void onsuccess(<a href="#GestureData">GestureData</a> data);
+ </pre></div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+ <li class="param">
+<span class="name">data</span>:
+ GestureData which contains information about detected gesture.
+ </li>
+ </ul>
+</div>
+</dd>
+</dl>
+</div>
+</div>
</div>
<h2 id="api-features">3. Related Feature</h2>
<div id="def-api-features" class="def-api-features">
<div class="def-api-feature">
<p><div class="description">
<p>
+To guarantee that the gesture recognition application runs on a device with gesture recognition feature, declare the following feature requirement in the config file:
+ </p>
+ </div></p>
+<li class="feature">http://tizen.org/feature/sensor.gesture_recognition</li>
+</div>
+<div class="def-api-feature">
+<p><div class="description">
+ <p>
To guarantee that the Heart Rate Monitor application runs on a device with heart rate monitor, declare the following feature requirements in the config file:
</p>
</div></p>
enum SleepStatus { "ASLEEP", "AWAKE", "UNKNOWN" };
+ enum GestureType { "GESTURE_DOUBLE_TAP", "GESTURE_MOVE_TO_EAR", "GESTURE_NO_MOVE", "GESTURE_PICK_UP",
+ "GESTURE_SHAKE", "GESTURE_SNAP", "GESTURE_TILT", "GESTURE_TURN_FACE_DOWN", "GESTURE_WRIST_UP" };
+ enum GestureEvent { "GESTURE_EVENT_DETECTED", "GESTURE_SHAKE_DETECTED", "GESTURE_SHAKE_FINISHED", "GESTURE_SNAP_X_NEGATIVE",
+ "GESTURE_SNAP_X_POSITIVE", "GESTURE_SNAP_Y_NEGATIVE", "GESTURE_SNAP_Y_POSITIVE", "GESTURE_SNAP_Z_NEGATIVE", "GESTURE_SNAP_Z_POSITIVE" };
+
+
[NoInterfaceObject] interface HumanActivityMonitorManagerObject {
readonly attribute <a href="#HumanActivityMonitorManager">HumanActivityMonitorManager</a> humanactivitymonitor;
};
HumanActivityRecorderQuery? query,
HumanActivityReadRecorderSuccessCallback successCallback,
optional ErrorCallback? errorCallback) raises(WebAPIException);
+
+ boolean isGestureSupported(GestureType type) raises(WebAPIException);
+ long addGestureRecognitionListener(GestureType type, GestureRecognitionCallback listener, optional ErrorCallback? errorCallback, optional boolean? alwaysOn) raises(WebAPIException);
+ void removeGestureRecognitionListener(long watchId) raises(WebAPIException);
};
[NoInterfaceObject] interface StepDifference {
readonly attribute double? average;
};
+ [NoInterfaceObject] interface GestureData {
+ readonly attribute GestureType type;
+ readonly attribute GestureEvent event;
+ readonly attribute long timestamp;
+ readonly attribute double? x;
+ readonly attribute double? y;
+ };
+
[Callback=FunctionOnly, NoInterfaceObject] interface HumanActivityMonitorSuccessCallback {
void onsuccess(optional HumanActivityData? humanactivitydata);
void onsuccess(HumanActivityRecorderData[] humanactivitydata);
};
+
+ [Callback=FunctionOnly, NoInterfaceObject] interface GestureRecognitionCallback {
+ void onsuccess(GestureData data);
+ };
};</pre>
</div>
<div id="page-footer">
Get current human activity monitor data </li>
<li>
Record and read human activity data </li>
+ <li>
+Recognize activities and gestures </li>
</ul>
<p>
+The gesture recognition API allows applications to be notified and react when the user performs different types of gestures, for example, when the device was tapped, shaken up, picked up or moved along axis.
+ </p>
+ <p>
+The activity recognition API allows applications to be notified and react when a user activity is recognized, for example, the user starts to run, walk or is in moving vehicle.
+ </p>
+ <p>
For more information about how to use Human Activity Monitor API, see <a href="https://developer.tizen.org/development/guides/web-application/tizen-features/system/human-activity-monitor">Human Activity Monitor Guide</a>.
</p>
</div>
<h2>Table of Contents</h2>
<ul class="toc">
<li>1. <a href="#typedefs-section">Type Definitions</a><ul class="toc">
-<li>
+<li class="deprecated">
1.1. <a href="#HumanActivityType">HumanActivityType</a>
</li>
<li>
<li>
1.6. <a href="#SleepStatus">SleepStatus</a>
</li>
+<li>
+ 1.7. <a href="#GestureType">GestureType</a>
+</li>
+<li>
+ 1.8. <a href="#GestureEvent">GestureEvent</a>
+</li>
</ul>
</li>
<li>2. <a href="#interfaces-section">Interfaces</a><ul class="toc">
</li>
<li>2.19. <a href="#HumanActivityRecorderPressureData">HumanActivityRecorderPressureData</a>
</li>
-<li>2.20. <a href="#HumanActivityMonitorSuccessCallback">HumanActivityMonitorSuccessCallback</a>
+<li>2.20. <a href="#GestureData">GestureData</a>
</li>
-<li>2.21. <a href="#HumanActivityReadRecorderSuccessCallback">HumanActivityReadRecorderSuccessCallback</a>
+<li>2.21. <a href="#HumanActivityMonitorSuccessCallback">HumanActivityMonitorSuccessCallback</a>
+</li>
+<li>2.22. <a href="#HumanActivityReadRecorderSuccessCallback">HumanActivityReadRecorderSuccessCallback</a>
+</li>
+<li>2.23. <a href="#GestureRecognitionCallback">GestureRecognitionCallback</a>
</li>
</ul>
</li>
<div>void <a href="#HumanActivityMonitorManager::startRecorder">startRecorder</a> (<a href="#HumanActivityRecorderType">HumanActivityRecorderType</a> type, optional <a href="#HumanActivityRecorderOption">HumanActivityRecorderOption</a> option)</div>
<div>void <a href="#HumanActivityMonitorManager::stopRecorder">stopRecorder</a> (<a href="#HumanActivityRecorderType">HumanActivityRecorderType</a> type)</div>
<div>void <a href="#HumanActivityMonitorManager::readRecorderData">readRecorderData</a> (<a href="#HumanActivityRecorderType">HumanActivityRecorderType</a> type, <a href="#HumanActivityRecorderQuery">HumanActivityRecorderQuery</a>? query, <a href="#HumanActivityReadRecorderSuccessCallback">HumanActivityReadRecorderSuccessCallback</a> successCallback, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback)</div>
+<div>boolean <a href="#HumanActivityMonitorManager::isGestureSupported">isGestureSupported</a> (<a href="#GestureType ">GestureType </a> type)</div>
+<div>long <a href="#HumanActivityMonitorManager::addGestureRecognitionListener">addGestureRecognitionListener</a> (<a href="#GestureType ">GestureType </a> type, <a href="#GestureRecognitionCallback">GestureRecognitionCallback</a> listener, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback, optional boolean? alwaysOn)</div>
+<div>void <a href="#HumanActivityMonitorManager::removeGestureRecognitionListener">removeGestureRecognitionListener</a> (long watchId)</div>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
+<td><a href="#GestureData">GestureData</a></td>
+<td></td>
+</tr>
+<tr>
<td><a href="#HumanActivityMonitorSuccessCallback">HumanActivityMonitorSuccessCallback</a></td>
<td><div>void <a href="#HumanActivityMonitorSuccessCallback::onsuccess">onsuccess</a> (optional <a href="#HumanActivityData">HumanActivityData</a>? humanactivitydata)</div></td>
</tr>
<td><a href="#HumanActivityReadRecorderSuccessCallback">HumanActivityReadRecorderSuccessCallback</a></td>
<td><div>void <a href="#HumanActivityReadRecorderSuccessCallback::onsuccess">onsuccess</a> (<a href="#HumanActivityRecorderData">HumanActivityRecorderData</a>[] humanactivitydata)</div></td>
</tr>
+<tr>
+<td><a href="#GestureRecognitionCallback">GestureRecognitionCallback</a></td>
+<td><div>void <a href="#GestureRecognitionCallback::onsuccess">onsuccess</a> (<a href="#GestureData">GestureData</a> data)</div></td>
+</tr>
</tbody>
</table>
<div class="typedefs" id="typedefs-section">
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onchangedCB(sleepInfo)
{
- console.log("Sleep status: " + sleepInfo.status);
- console.log("Timestamp: " + sleepInfo.timestamp);
+ console.log("Sleep status: " + sleepInfo.status);
+ console.log("Timestamp: " + sleepInfo.timestamp);
}
tizen.humanactivitymonitor.start("SLEEP_MONITOR", onchangedCB);
</pre>
</div>
</div>
+<div class="enum" id="GestureType">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::GestureType"></a><h3>1.7. GestureType</h3>
+<div class="brief">
+ Specifies the gesture types.
+ </div>
+<pre class="webidl prettyprint"> enum GestureType { "GESTURE_DOUBLE_TAP", "GESTURE_MOVE_TO_EAR", "GESTURE_NO_MOVE", "GESTURE_PICK_UP",
+ "GESTURE_SHAKE", "GESTURE_SNAP", "GESTURE_TILT", "GESTURE_TURN_FACE_DOWN", "GESTURE_WRIST_UP" };</pre>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="description">
+ <ul>
+ <li>
+GESTURE_DOUBLE_TAP - The display of the mobile device is tapped twice </li>
+ <li>
+GESTURE_MOVE_TO_EAR - The mobile device is moved near to an ear </li>
+ <li>
+GESTURE_NO_MOVE - The mobile device is being stopped for a while </li>
+ <li>
+GESTURE_PICK_UP - The mobile device is picked up </li>
+ <li>
+GESTURE_SHAKE - The mobile device is quickly moved back and forth </li>
+ <li>
+GESTURE_SNAP - The mobile device is moved along an axis and back </li>
+ <li>
+GESTURE_TILT - The mobile device is tilted </li>
+ <li>
+GESTURE_TURN_FACE_DOWN - The mobile device is flipped from face to back </li>
+ <li>
+GESTURE_WRIST_UP - The wearable device is moved and faced up </li>
+ </ul>
+ </div>
+</div>
+<div class="enum" id="GestureEvent">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::GestureEvent"></a><h3>1.8. GestureEvent</h3>
+<div class="brief">
+ Specifies the gesture events.
+ </div>
+<pre class="webidl prettyprint"> enum GestureEvent { "GESTURE_EVENT_DETECTED", "GESTURE_SHAKE_DETECTED", "GESTURE_SHAKE_FINISHED", "GESTURE_SNAP_X_NEGATIVE",
+ "GESTURE_SNAP_X_POSITIVE", "GESTURE_SNAP_Y_NEGATIVE", "GESTURE_SNAP_Y_POSITIVE", "GESTURE_SNAP_Z_NEGATIVE", "GESTURE_SNAP_Z_POSITIVE" };</pre>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="description">
+ <ul>
+ <li>
+GESTURE_EVENT_DETECTED - The gesture is detected </li>
+ <li>
+GESTURE_SHAKE_DETECTED - Shake gesture is detected </li>
+ <li>
+GESTURE_SHAKE_FINISHED - Shake gesture is finished </li>
+ <li>
+GESTURE_SNAP_X_NEGATIVE - [-X] snap is detected </li>
+ <li>
+GESTURE_SNAP_X_POSITIVE - [+X] snap is detected </li>
+ <li>
+GESTURE_SNAP_Y_NEGATIVE - [-Y] snap is detected </li>
+ <li>
+GESTURE_SNAP_Y_POSITIVE - [+Y] snap is detected </li>
+ <li>
+GESTURE_SNAP_Z_NEGATIVE - [-Z] snap is detected </li>
+ <li>
+GESTURE_SNAP_Z_POSITIVE - [+Z] snap is detected </li>
+ </ul>
+ </div>
+</div>
</div>
<div class="interfaces" id="interfaces-section">
<h2>2. Interfaces</h2>
HumanActivityRecorderQuery? query,
HumanActivityReadRecorderSuccessCallback successCallback,
optional ErrorCallback? errorCallback) raises(WebAPIException);
+
+ boolean isGestureSupported(GestureType type) raises(WebAPIException);
+
+ long addGestureRecognitionListener(GestureType type, GestureRecognitionCallback listener, optional ErrorCallback? errorCallback, optional boolean? alwaysOn) raises(WebAPIException);
+
+ void removeGestureRecognitionListener(long watchId) raises(WebAPIException);
};</pre>
<p><span class="version">
Since: </span>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onsuccessCB(pedometerInfo)
{
- console.log("Step status: " + pedometerInfo.stepStatus);
- console.log("Cumulative total step count: " + pedometerInfo.cumulativeTotalStepCount);
+ console.log("Step status: " + pedometerInfo.stepStatus);
+ console.log("Cumulative total step count: " + pedometerInfo.cumulativeTotalStepCount);
}
function onerrorCB(error)
{
- console.log("Error occurs. name:" + error.name + ", message: " + error.message);
+ console.log("Error occurs. name:" + error.name + ", message: " + error.message);
}
function onchangedCB(pedometerdata)
{
- console.log("From now on, you will be notified when the pedometer data changes.");
- /* To get the current data information */
- tizen.humanactivitymonitor.getHumanActivityData("PEDOMETER", onsuccessCB, onerrorCB);
+ console.log("From now on, you will be notified when the pedometer data changes.");
+ /* To get the current data information */
+ tizen.humanactivitymonitor.getHumanActivityData("PEDOMETER", onsuccessCB, onerrorCB);
}
tizen.humanactivitymonitor.start("PEDOMETER", onchangedCB);
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onchangedCB(pedometerInfo)
{
- console.log("Step status: " + pedometerInfo.stepStatus);
- console.log("Cumulative total step count: " + pedometerInfo.cumulativeTotalStepCount);
+ console.log("Step status: " + pedometerInfo.stepStatus);
+ console.log("Cumulative total step count: " + pedometerInfo.cumulativeTotalStepCount);
}
tizen.humanactivitymonitor.start("PEDOMETER", onchangedCB);
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onchangedCB(info)
{
- var gpsInfo = info.gpsInfo;
- for (var index = 0; index < gpsInfo.length; index++)
- {
- console.log("latitude: " + gpsInfo[index].latitude);
- console.log("longitude: " + gpsInfo[index].longitude);
- }
+ var gpsInfo = info.gpsInfo;
+ for (var index = 0; index < gpsInfo.length; index++)
+ {
+ console.log("latitude: " + gpsInfo[index].latitude);
+ console.log("longitude: " + gpsInfo[index].longitude);
+ }
}
function onerrorCB(error)
{
- console.log("Error occurred. Name:" + error.name + ", message: " + error.message);
+ console.log("Error occurred. Name:" + error.name + ", message: " + error.message);
}
try
{
- tizen.humanactivitymonitor.start("GPS", onchangedCB, onerrorCB, {callbackInterval: 150000, sampleInterval: 1000});
+ tizen.humanactivitymonitor.start("GPS", onchangedCB, onerrorCB,
+ {callbackInterval: 150000, sampleInterval: 1000});
}
catch (err)
{
- console.log(err.name + ": " + err.message);
+ console.log(err.name + ": " + err.message);
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onchangedCB(pedometerInfo)
{
- console.log("Step status: " + pedometerInfo.stepStatus);
- console.log("Accumulative total step count: " + pedometerInfo.accumulativeTotalStepCount);
+ console.log("Step status: " + pedometerInfo.stepStatus);
+ console.log("Accumulative total step count: " + pedometerInfo.accumulativeTotalStepCount);
}
tizen.humanactivitymonitor.setAccumulativePedometerListener(onchangedCB);
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function errorCallback(error)
{
- console.log(error.name + ': ' + error.message);
+ console.log(error.name + ": " + error.message);
}
function listener(info)
{
- console.log('type: ' + info.type);
- console.log('timestamp: ' + info.timestamp);
- console.log('accuracy: ' + info.accuracy);
+ console.log("type: " + info.type);
+ console.log("timestamp: " + info.timestamp);
+ console.log("accuracy: " + info.accuracy);
}
try
{
- var listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
+ var listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
}
catch (error)
{
- console.log(error.name + ': ' + error.message);
+ console.log(error.name + ": " + error.message);
}
</pre>
</div>
function errorCallback(error)
{
- console.log(error.name + ': ' + error.message);
+ console.log(error.name + ": " + error.message);
}
function listener(info)
{
- console.log('type: ' + info.type);
- console.log('timestamp: ' + info.timestamp);
- console.log('accuracy: ' + info.accuracy);
+ console.log("type: " + info.type);
+ console.log("timestamp: " + info.timestamp);
+ console.log("accuracy: " + info.accuracy);
- tizen.humanactivitymonitor.removeActivityRecognitionListener(listenerId, errorCallback);
+ tizen.humanactivitymonitor.removeActivityRecognitionListener(listenerId, errorCallback);
}
try
{
- listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
+ listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
}
catch (error)
{
- console.log(error.name + ': ' + error.message);
+ console.log(error.name + ": " + error.message);
}
</pre>
</div>
</div>
<div class="example">
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
-var type = 'PRESSURE';
+var type = "PRESSURE";
var options =
{
- retentionPeriod: 1 /* 1 hour */
+ retentionPeriod: 1 /* 1 hour */
};
+
try
{
- tizen.humanactivitymonitor.startRecorder(type, options);
+ tizen.humanactivitymonitor.startRecorder(type, options);
}
catch (err)
{
- console.log(err.name + ': ' + err.message);
+ console.log(err.name + ": " + err.message);
}
</pre>
</div>
</div>
<div class="example">
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
-var type = 'PRESSURE';
+var type = "PRESSURE";
try
{
- tizen.humanactivitymonitor.startRecorder(type);
+ tizen.humanactivitymonitor.startRecorder(type);
+ /* Do something */
- /* Do something */
-
- tizen.humanactivitymonitor.stopRecorder(type);
+ tizen.humanactivitymonitor.stopRecorder(type);
}
catch (err)
{
- console.log(err.name + ': ' + err.message);
+ console.log(err.name + ": " + err.message);
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onerror(error)
{
- console.log(error.name + ": " + error.message);
+ console.log(error.name + ": " + error.message);
}
function onread(data)
{
- for (var idx = 0; idx < data.length; ++idx)
- {
- console.log('startTime: ' + data[idx].startTime);
- console.log('endTime: ' + data[idx].endTime);
- console.log('calories: ' + data[idx].calorie);
- }
+ for (var idx = 0; idx < data.length; ++idx)
+ {
+ console.log("startTime: " + data[idx].startTime);
+ console.log("endTime: " + data[idx].endTime);
+ console.log("calories: " + data[idx].calorie);
+ }
}
-var type = 'PEDOMETER';
+var type = "PEDOMETER";
var query = {};
try
{
- tizen.humanactivitymonitor.readRecorderData(type, query, onread, onerror);
+ tizen.humanactivitymonitor.readRecorderData(type, query, onread, onerror);
}
catch (err)
{
- console.log(err.name + ': ' + err.message);
+ console.log(err.name + ": " + err.message);
}
</pre>
</div>
</pre>
</div>
</dd>
+<dt class="method" id="HumanActivityMonitorManager::isGestureSupported">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityMonitorManager::isGestureSupported"></a><code><b><span class="methodName">isGestureSupported</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Checks if gesture type is supported on a device.
+ </div>
+<div class="synopsis"><pre class="signature prettyprint">boolean isGestureSupported(<a href="#GestureType">GestureType</a> type);
+ </pre></div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="description">
+ <p>
+This function allows to check whether a gesture type is supported on the current device. Some gestures may not be supported on some devices because of lack necessary sensors.
+ </p>
+ </div>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+ <li class="param">
+<span class="name">type</span>:
+ Gesture type to check if it is supported on a device.
+ </li>
+ </ul>
+</div>
+<div class="returntype">
+<p><span class="return">Return value:</span></p>
+ boolean <em>true</em> if the given gesture type is supported.
+ </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+ <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if input parameter is not compatible with the expected type.
+ </p></li>
+<li class="list"><p>
+ with error type AbortError, if any error occurs.
+ </p></li>
+</ul>
+</li></ul>
+ </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+ var isSupported = tizen.humanactivitymonitor.isGestureSupported("GESTURE_PICK_UP");
+ console.log("GESTURE_PICK_UP is " + (isSupported ? "supported" : "not supported"));
+}
+catch (error)
+{
+ console.log("Error " + error.name + ": " + error.message);
+}
+</pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> GESTURE_PICK_UP is supported.
+ </pre>
+</div>
+</dd>
+<dt class="method" id="HumanActivityMonitorManager::addGestureRecognitionListener">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityMonitorManager::addGestureRecognitionListener"></a><code><b><span class="methodName">addGestureRecognitionListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Adds a listener to be invoked when given gesture type is detected.
+ </div>
+<div class="synopsis"><pre class="signature prettyprint">long addGestureRecognitionListener(<a href="#GestureType">GestureType</a> type, <a href="#GestureRecognitionCallback">GestureRecognitionCallback</a> listener, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback, optional boolean? alwaysOn);
+ </pre></div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="description">
+ <p>
+The <em>ErrorCallback</em> method is launched with this error type:
+ </p>
+ <ul>
+ <li>
+ AbortError : If the system operation was aborted. </li>
+ </ul>
+ </div>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+ <li class="param">
+<span class="name">type</span>:
+ The gesture type to be monitored.
+ </li>
+ <li class="param">
+<span class="name">listener</span>:
+ Listener to be called when gesture is detected or an error occurred.
+ </li>
+ <li class="param">
+<span class="name">errorCallback</span><span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
+ Callback method to be invoked when an error occurs.
+ </li>
+ <li class="param">
+<span class="name">alwaysOn</span><span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
+ The option of the monitored gesture mode. If it is set to <em>false</em> system may try to reduce power consumption, for example by stoping detecting gestures when display is turned off.<br>If it is set to <em>true</em> power-saving functionality is off. Default value is <em>false</em>.
+ </li>
+ </ul>
+</div>
+<div class="returntype">
+<p><span class="return">Return value:</span></p>
+ long The watch ID used to remove the listener.
+ </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+ <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
+ </p></li>
+<li class="list"><p>
+ with error type NotSupportedError, if the gesture recognition is not supported.
+ </p></li>
+<li class="list"><p>
+ with error type IOError, if adding listener failed.
+ </p></li>
+</ul>
+</li></ul>
+ </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function listener(data)
+{
+ console.log("Received " + data.event + " event on " + new Date(data.timestamp * 1000) + " for " + data.type + " type");
+}
+
+function errorCallback(error)
+{
+ console.log(error.name + ": " + error.message);
+}
+
+try
+{
+ var listenerId = tizen.humanactivitymonitor.addGestureRecognitionListener("GESTURE_SHAKE", listener, errorCallback, true);
+ console.log("Listener with id " + listenerId + " has been added");
+}
+catch (error)
+{
+ console.log("Error " + error.name + ": " + error.message);
+}
+</pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Listener with id 1 has been added
+ Received GESTURE_SHAKE_DETECTED event on Thu Sep 01 2016 14:33:56 GMT+0200 (CEST) for GESTURE_SHAKE type
+ </pre>
+</div>
+</dd>
+<dt class="method" id="HumanActivityMonitorManager::removeGestureRecognitionListener">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityMonitorManager::removeGestureRecognitionListener"></a><code><b><span class="methodName">removeGestureRecognitionListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Removes listener with the given id.
+ </div>
+<div class="synopsis"><pre class="signature prettyprint">void removeGestureRecognitionListener(long watchId);
+ </pre></div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+ <li class="param">
+<span class="name">watchId</span>:
+ The ID of the registered listener.
+ </li>
+ </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+ <ul class="exception"><li>WebAPIException<ul><li class="list"><p>
+ with error type AbortError, if system error occurs while removing listener.
+ </p></li></ul>
+</li></ul>
+ </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function listener(data)
+{
+ console.log("Received " + data.event + " event on " + new Date(data.timestamp * 1000) + " for " + data.type + " type");
+}
+
+function errorCallback(error)
+{
+ console.log(error.name + ": " + error.message);
+}
+
+try
+{
+ var listenerId = tizen.humanactivitymonitor.addGestureRecognitionListener("GESTURE_SHAKE", listener, errorCallback);
+ tizen.humanactivitymonitor.removeGestureRecognitionListener(listenerId);
+ console.log("Listener with id " + listenerId + " has been removed");
+}
+catch (error)
+{
+ console.log("Error " + error.name + ": " + error.message);
+}
+</pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Listener with id 1 has been removed
+ </pre>
+</div>
+</dd>
</dl>
</div>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
var option =
{
- interval: 10,
- retentionPeriod: 1
+ interval: 10,
+ retentionPeriod: 1
}
</pre>
</div>
<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
function onerror(error)
{
- console.log(error.name + ": " + error.message);
+ console.log(error.name + ": " + error.message);
}
function onread(data)
{
- for (var idx = 0; idx < data.length; ++idx)
- {
- console.log("*** " + idx);
- console.log('totalStepCount: ' + data[idx].totalStepCount);
- }
+ for (var idx = 0; idx < data.length; ++idx)
+ {
+ console.log("*** " + idx);
+ console.log("max pressure: " + data[idx].max);
+ console.log("min pressure: " + data[idx].min);
+ console.log("average: " + data[idx].average);
+ }
}
-var type = 'PEDOMETER';
+var type = "PRESSURE";
var now = new Date();
-var startTime = now.setDate(now.getDate() - 7);
+var startTime = now.setDate(now.getDate() - 4);
var anchorTime = (new Date(2000, 1, 2, 6)).getTime();
var query =
{
- startTime: startTime / 1000,
- anchorTime: anchorTime / 1000,
- interval: 1440 /* 1 day */
+ startTime: startTime / 1000,
+ anchorTime: anchorTime / 1000,
+ interval: 1440 /* 1 day */
};
+
try
{
- tizen.humanactivitymonitor.readRecorderData(type, query, onread, onerror);
+ tizen.humanactivitymonitor.readRecorderData(type, query, onread, onerror);
}
catch (err)
{
- console.log(err.name + ': ' + err.message);
+ console.log(err.name + ": " + err.message);
}
</pre>
</div>
<div class="output">
<span class="title"><p>Output example:</p></span><pre> *** 0
- totalStepCount: 3860
+ max pressure: 1013.00
+ min pressure: 930.00
+ average: 980.00
*** 1
- totalStepCount: 6705
+ max pressure: 1012.00
+ min pressure: 954.00
+ average: 986.00
*** 2
- totalStepCount: 4005
+ max pressure: 950.00
+ min pressure: 904.00
+ average: 932.00
*** 3
- totalStepCount: 2328
+ max pressure: 1012.00
+ min pressure: 920.00
+ average: 942.00
*** 4
- totalStepCount: 4705
- *** 5
- totalStepCount: 6446
- *** 6
- totalStepCount: 4103
- *** 7
- totalStepCount: 1456
+ max pressure: 1012.00
+ min pressure: 1005.00
+ average: 1008.00
</pre>
</div>
</dd>
</ul>
</div>
</div>
+<div class="interface" id="GestureData">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::GestureData"></a><h3>2.20. GestureData</h3>
+<div class="brief">
+ The GestureData interface represents detected gesture information.
+ </div>
+<pre class="webidl prettyprint"> [NoInterfaceObject] interface GestureData {
+ readonly attribute <a href="#GestureType">GestureType</a> type;
+ readonly attribute <a href="#GestureEvent">GestureEvent</a> event;
+ readonly attribute long timestamp;
+ readonly attribute double? x;
+ readonly attribute double? y;
+ };</pre>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="attributes">
+<h4>Attributes</h4>
+<ul>
+<li class="attribute" id="GestureData::type">
+<span class="attrName"><span class="readonly"> readonly
+</span><span class="type">GestureType </span><span class="name">type</span></span><div class="brief">
+ Identifier of gesture type.
+ </div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+</li>
+<li class="attribute" id="GestureData::event">
+<span class="attrName"><span class="readonly"> readonly
+</span><span class="type">GestureEvent </span><span class="name">event</span></span><div class="brief">
+ Event type related to the detected gesture.
+ </div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+</li>
+<li class="attribute" id="GestureData::timestamp">
+<span class="attrName"><span class="readonly"> readonly
+</span><span class="type">long </span><span class="name">timestamp</span></span><div class="brief">
+ Time when gesture was detected. Epoch time in seconds.
+ </div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+</li>
+<li class="attribute" id="GestureData::x">
+<span class="attrName"><span class="readonly"> readonly
+</span><span class="type">double </span><span class="name">x</span><span class="optional"> [nullable]</span></span><div class="brief">
+ Tilt degree on X-axis. It is used only for <em>GESTURE_TILT</em> type. For other gesture types it is set to null.
+ </div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+</li>
+<li class="attribute" id="GestureData::y">
+<span class="attrName"><span class="readonly"> readonly
+</span><span class="type">double </span><span class="name">y</span><span class="optional"> [nullable]</span></span><div class="brief">
+ Tilt degree on Y-axis. It is used only for <em>GESTURE_TILT</em> type. For other gesture types it is set to null.
+ </div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+</li>
+</ul>
+</div>
+</div>
<div class="interface" id="HumanActivityMonitorSuccessCallback">
-<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityMonitorSuccessCallback"></a><h3>2.20. HumanActivityMonitorSuccessCallback</h3>
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityMonitorSuccessCallback"></a><h3>2.21. HumanActivityMonitorSuccessCallback</h3>
<div class="brief">
The HumanActivityMonitorSuccessCallback interface is a callback interface that is invoked when new human activity data is available.
</div>
</div>
</div>
<div class="interface" id="HumanActivityReadRecorderSuccessCallback">
-<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityReadRecorderSuccessCallback"></a><h3>2.21. HumanActivityReadRecorderSuccessCallback</h3>
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::HumanActivityReadRecorderSuccessCallback"></a><h3>2.22. HumanActivityReadRecorderSuccessCallback</h3>
<div class="brief">
The HumanActivityReadRecorderSuccessCallback interface is a callback interface that is invoked when recorded human activity data is successfully read.
</div>
</dl>
</div>
</div>
+<div class="interface" id="GestureRecognitionCallback">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::GestureRecognitionCallback"></a><h3>2.23. GestureRecognitionCallback</h3>
+<div class="brief">
+ The GestureRecognitionCallback describes a callback for the addGestureRecognitionListener() method.
+ </div>
+<pre class="webidl prettyprint"> [Callback=FunctionOnly, NoInterfaceObject] interface GestureRecognitionCallback {
+ void onsuccess(<a href="#GestureData">GestureData</a> data);
+ };</pre>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="GestureRecognitionCallback::onsuccess">
+<a class="backward-compatibility-anchor" name="::HumanActivityMonitor::GestureRecognitionCallback::onsuccess"></a><code><b><span class="methodName">onsuccess</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Called when a gesture is detected.
+ </div>
+<div class="synopsis"><pre class="signature prettyprint">void onsuccess(<a href="#GestureData">GestureData</a> data);
+ </pre></div>
+<p><span class="version">
+ Since: </span>
+ 4.0
+ </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+ <li class="param">
+<span class="name">data</span>:
+ GestureData which contains information about detected gesture.
+ </li>
+ </ul>
+</div>
+</dd>
+</dl>
+</div>
+</div>
</div>
<h2 id="api-features">3. Related Feature</h2>
<div id="def-api-features" class="def-api-features">
<div class="def-api-feature">
<p><div class="description">
<p>
+To guarantee that the gesture recognition application runs on a device with gesture recognition feature, declare the following feature requirement in the config file:
+ </p>
+ </div></p>
+<li class="feature">http://tizen.org/feature/sensor.gesture_recognition</li>
+</div>
+<div class="def-api-feature">
+<p><div class="description">
+ <p>
To guarantee that the Heart Rate Monitor application runs on a device with heart rate monitor, declare the following feature requirements in the config file:
</p>
</div></p>
enum SleepStatus { "ASLEEP", "AWAKE", "UNKNOWN" };
+ enum GestureType { "GESTURE_DOUBLE_TAP", "GESTURE_MOVE_TO_EAR", "GESTURE_NO_MOVE", "GESTURE_PICK_UP",
+ "GESTURE_SHAKE", "GESTURE_SNAP", "GESTURE_TILT", "GESTURE_TURN_FACE_DOWN", "GESTURE_WRIST_UP" };
+ enum GestureEvent { "GESTURE_EVENT_DETECTED", "GESTURE_SHAKE_DETECTED", "GESTURE_SHAKE_FINISHED", "GESTURE_SNAP_X_NEGATIVE",
+ "GESTURE_SNAP_X_POSITIVE", "GESTURE_SNAP_Y_NEGATIVE", "GESTURE_SNAP_Y_POSITIVE", "GESTURE_SNAP_Z_NEGATIVE", "GESTURE_SNAP_Z_POSITIVE" };
+
+
[NoInterfaceObject] interface HumanActivityMonitorManagerObject {
readonly attribute <a href="#HumanActivityMonitorManager">HumanActivityMonitorManager</a> humanactivitymonitor;
};
HumanActivityRecorderQuery? query,
HumanActivityReadRecorderSuccessCallback successCallback,
optional ErrorCallback? errorCallback) raises(WebAPIException);
+
+ boolean isGestureSupported(GestureType type) raises(WebAPIException);
+
+ long addGestureRecognitionListener(GestureType type, GestureRecognitionCallback listener, optional ErrorCallback? errorCallback, optional boolean? alwaysOn) raises(WebAPIException);
+
+ void removeGestureRecognitionListener(long watchId) raises(WebAPIException);
};
[NoInterfaceObject] interface StepDifference {
};
dictionary HumanActivityRecorderOption {
-
long interval;
long retentionPeriod;
};
dictionary HumanActivityRecorderQuery {
-
long startTime;
long endTime;
long sampleInterval;
};
-
[NoInterfaceObject] interface HumanActivityRecognitionData : HumanActivityData {
readonly attribute ActivityRecognitionType type;
readonly attribute double? average;
};
+ [NoInterfaceObject] interface GestureData {
+ readonly attribute GestureType type;
+ readonly attribute GestureEvent event;
+ readonly attribute long timestamp;
+ readonly attribute double? x;
+ readonly attribute double? y;
+ };
+
[Callback=FunctionOnly, NoInterfaceObject] interface HumanActivityMonitorSuccessCallback {
void onsuccess(optional HumanActivityData? humanactivitydata);
void onsuccess(HumanActivityRecorderData[] humanactivitydata);
};
+
+ [Callback=FunctionOnly, NoInterfaceObject] interface GestureRecognitionCallback {
+ void onsuccess(GestureData data);
+ };
};</pre>
</div>
<div id="page-footer">