<ul class="toc">
<li><a href="#manage">Managing Sensors</a></li>
<li><a href="#receive">Receiving Notifications on Sensor Data Changes</a></li>
+ <li><a href="#hw-information">Obtaining Sensor Hardware Information</a></li>
</ul>
<p class="toc-title">Related Info</p>
<ul class="toc">
<p>You can <a href="#manage">enable the sensor, read sensor data, and disable the sensor</a>.</p></li>
<li>Receiving notifications
<p>You can <a href="#receive">receive notifications on sensor data changes</a>.</p></li>
+<li>Obtaining sensor hardware information
+<p>You can <a href="#hw-information">retrieve information about the technical limits of the sensor</a>.</p></li>
</ul>
<p>The supported sensor types and their capabilities are listed in the following table.</p>
<ul>
<li><a href="#manage">Managing Sensors</a><p>Check, whether the sensor is supported, enable the sensor, read sensor data, and disable the sensor.</p></li>
<li><a href="#receive">Receiving Notifications on Sensor Data Changes</a><p>Register an event handler to receive notifications on sensor data changes.</p></li>
+ <li><a href="#hw-information">Obtaining Sensor Hardware Information</a><p>Retrieve information about the technical limits of the sensor.</p></li>
</ul>
<h2>Task in Mobile Applications</h2>
<h2 id="receive" name="receive">Receiving Notifications on Sensor Data Changes</h2>
-<p>Learning how to register a change event handler for sensor data enables your application to react to changes without the need to check current values constantly.</p>
+<p>Learning how to register a change event handler for sensor data enables your application to react to changes without the need to check current values constantly:</p>
<ol>
</li>
</ol>
+<h2 id="hw-information" name="hw-information">Obtaining Sensor Hardware Information</h2>
+
+<p>Learning how to retrieve information about the sensor hardware enables your application to know the sensor's technical limits:</p>
+
+<ol>
+
+<li>Define a success callback for handling a <span style="font-family: Courier New,Courier,monospace">SensorHardwareInfo</span> object (in <a href="../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/sensor.html#SensorHardwareInfo">mobile</a> and <a href="../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/sensor.html#SensorHardwareInfo">wearable</a> applications). You can also define an optional error callback.
+<pre class="prettyprint">
+function onsuccessCB(hwInfo)
+{
+ console.log("name: " + hwInfo.name);
+ console.log("type: " + hwInfo.type);
+ console.log("vendor: " + hwInfo.vendor);
+ console.log("minValue: " + hwInfo.minValue);
+ console.log("maxValue: " + hwInfo.maxValue);
+ console.log("resolution: " + hwInfo.resolution);
+ console.log("minInterval: " + hwInfo.minInterval);
+ console.log("maxBatchCount: " + hwInfo.maxBatchCount);
+}
+
+function onerrorCB(error)
+{
+ console.log("An error occurred: " + error.message);
+}
+</pre>
+</li>
+
+<li>Call the <span style="font-family: Courier New,Courier,monospace">getSensorHardwareInfo()</span> method of an existing <span style="font-family: Courier New,Courier,monospace">Sensor</span> object to obtain its hardware information as the <span style="font-family: Courier New,Courier,monospace">SensorHardwareInfo</span> object:
+<pre class="prettyprint">
+var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
+
+proximitySensor.getSensorHardwareInfo(onsuccessCB, onerrorCB);
+</pre>
+</li>
+</ol>
+
<script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>
<script type="text/javascript" src="../../scripts/showhide.js"></script>
</div></div></div>