*
* To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
*
- * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/tools/native-tools/manifest-text-editor#feature"><b>Feature Element</b>.</a>
*
*/
*
* To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
*
- * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/tools/native-tools/manifest-text-editor#feature"><b>Feature Element</b>.</a>
*
*/
*
* To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
*
- * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/tools/native-tools/manifest-text-editor#feature"><b>Feature Element</b>.</a>
*
*
*/
/**
* @brief Gets sensor data.
+ * @details This function may fail (return #SENSOR_ERROR_OPERATION_FAILED) if it is called before the sensor is ready.
+ * In case of interval-driven sensors,
+ * it is recommended to call the function after at least one sensor event is delivered.
+ * Otherwise, applications can retry to call this function to be sure that the sensor is ready.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
* @param[in] listener The listener handle
* @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #SENSOR_ERROR_NOT_SUPPORTED The sensor type is not supported in the current device
* @retval #SENSOR_ERROR_IO_ERROR I/O error
+ * @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed
*
* @pre In order to read sensor data, an application should call sensor_listener_start().
*/
/**
* @brief Changes the interval at sensor measurements.
+ * @details The specified interval is only a suggested interval between sensor measurements.
+ * You will get at least one sensor measurement within the interval you specify,
+ * but the actual interval between sensor measurements can be affected by other applications and the system.
+ * To reduce the system overhead, it is recommended to set the longest interval that you can,
+ * because the system usually chooses the shortest interval among all intervals specified.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
* @param[in] listener The listener handle
/**
* @brief Changes the option of the sensor.
- * @details If it is default, sensor data cannot be recieved when the LCD is off and in the power save mode.
+ * @details If it is default, sensor data cannot be received when the LCD is off and in the power save mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
* @param[in] listener The listener handle
if (listener->magic != SENSOR_LISTENER_MAGIC)
return SENSOR_ERROR_INVALID_PARAMETER;
- if (!sensord_change_event_max_batch_latency(listener->id, max_batch_latency))
+#ifdef BATCH_SUPPORT
+ int type;
+ unsigned int event_id;
+
+ type = (int)listener->type;
+ event_id = type << SENSOR_SHIFT_TYPE | 0x1;
+
+ if (!sensord_change_event_max_batch_latency(listener->id, event_id, max_batch_latency))
return SENSOR_ERROR_NOT_SUPPORTED;
_D("success sensor_set_max_batch_latency");
return SENSOR_ERROR_NONE;
+#else
+ return SENSOR_ERROR_NOT_SUPPORTED;
+#endif /* BATCH_SUPPORT */
}
int sensor_listener_set_option(sensor_listener_h listener, sensor_option_e option)