* @return @c 0 on success, otherwise a negative error value
* @retval #LOCATIONS_ERROR_NONE Successful
* @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
+ * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
* @post location_position_updated_cb() will be invoked
* @see location_manager_unset_position_updated_cb()
* @see location_position_updated_cb()
* @return @c 0 on success, otherwise a negative error value
* @retval #LOCATIONS_ERROR_NONE Successful
* @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
+ * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
* @see location_manager_set_position_updated_cb()
*/
int location_manager_unset_position_updated_cb(location_manager_h manager);
* @return @c 0 on success, otherwise a negative error value
* @retval #LOCATIONS_ERROR_NONE Successful
* @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
+ * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
* @post location_velocity_updated_cb() will be invoked
* @see location_manager_unset_velocity_updated_cb()
* @see location_velocity_updated_cb()
* @return @c 0 on success, otherwise a negative error value
* @retval #LOCATIONS_ERROR_NONE Successful
* @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
+ * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
* @see location_manager_set_velocity_updated_cb()
*/
int location_manager_unset_velocity_updated_cb(location_manager_h manager);
* @return @c 0 on success, otherwise a negative error value
* @retval #LOCATIONS_ERROR_NONE Successful
* @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
+ * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
* @post location_service_state_changed_cb() will be invoked
* @see location_manager_unset_service_state_changed_cb()
* @see location_service_state_changed_cb()
* @return @c 0 on success, otherwise a negative error value
* @retval #LOCATIONS_ERROR_NONE Successful
* @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
+ * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
* @see location_manager_set_service_state_changed_cb()
*/
int location_manager_unset_service_state_changed_cb(location_manager_h manager);
* @return @c 0 on success, otherwise a negative error value
* @retval #LOCATIONS_ERROR_NONE Successful
* @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
+ * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
* @pre location_manager_add_boundary() is called before.
* @post location_zone_changed_cb() will be invoked
* @see location_manager_unset_zone_changed_cb()
* @return 0 on success, otherwise a negative error value
* @retval #LOCATIONS_ERROR_NONE Successful
* @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
+ * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
* @see location_manager_set_zone_changed_cb()
*/
int location_manager_unset_zone_changed_cb(location_manager_h manager);
* @return 0 on success, otherwise a negative error value
* @retval #LOCATIONS_ERROR_NONE Successful
* @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
+ * @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method
+ * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
* @post location_setting_changed_cb() will be invoked
* @see location_manager_unset_setting_changed_cb()
* @see location_setting_changed_cb()
* @return 0 on success, otherwise a negative error value
* @retval #LOCATIONS_ERROR_NONE Successful
* @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
+ * @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method
+ * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
* @see location_manager_set_setting_changed_cb()
*/
int location_manager_unset_setting_changed_cb(location_method_e method);
* @brief Registers a callback function to be invoked when batch_period is expired.
* @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif
* @remarks The batch_period should be greater than or equal to the batch_interval.
+ * In addition, sometimes the period may not work as you intended, the maximum permissible value for batch_period is device specific.
* @param[in] manager The location manager handle
* @param[in] callback The callback function to register
* @param[in] batch_interval The batch sampling interval [1 ~ 255] (seconds)
LocationMethod _method = __convert_LocationMethod(method);
int ret = LOCATION_ERROR_NONE;
- if (_method == LOCATION_METHOD_NONE)
+ if (_method == LOCATION_METHOD_NONE) {
return __convert_error_code(LOCATION_ERROR_PARAMETER);
+ } else if (_method == LOCATION_METHOD_PASSIVE) {
+ LOCATIONS_LOGE("LOCATIONS_ERROR_INCORRECT_METHOD");
+ return LOCATIONS_ERROR_INCORRECT_METHOD;
+ }
g_location_setting[_method].callback = callback;
g_location_setting[_method].user_data = user_data;
LocationMethod _method = __convert_LocationMethod(method);
int ret = LOCATION_ERROR_NONE;
- if (_method == LOCATION_METHOD_NONE)
+ if (_method == LOCATION_METHOD_NONE) {
return __convert_error_code(LOCATION_ERROR_PARAMETER);
+ } else if (_method == LOCATION_METHOD_PASSIVE) {
+ LOCATIONS_LOGE("LOCATIONS_ERROR_INCORRECT_METHOD");
+ return LOCATIONS_ERROR_INCORRECT_METHOD;
+ }
ret = location_ignore_setting_notify(_method, __setting_changed_cb);
if (ret != LOCATION_ERROR_NONE) {