location_manager_h hLocationManager = NULL;
int nRet = location_manager_create(eLocationMethod, &hLocationManager);
PRINT_RESULT(LOCATIONS_ERROR_NONE, nRet, "location_manager_create", LocationManagerGetError(nRet));
-
- //Target API
- nRet = location_manager_set_mock_location(hLocationManager, nLatitude, nLongitude, nAltitude, nSpeed, nDirection, nAccuracy);
+
+ nRet = location_manager_enable_mock_location(true);
+ if(nRet == LOCATIONS_ERROR_NONE)
+ //Target API
+ nRet = location_manager_set_mock_location(hLocationManager, nLatitude, nLongitude, nAltitude, nSpeed, nDirection, nAccuracy);
PRINT_RESULT_CLEANUP(TIZEN_ERROR_PERMISSION_DENIED, nRet, "location_manager_set_mock_location", LocationManagerGetError(nRet), location_manager_destroy(hLocationManager));
location_manager_destroy(hLocationManager);
int nRet = location_manager_create(eLocationMethod, &hLocationManager);
PRINT_RESULT(LOCATIONS_ERROR_NONE, nRet, "location_manager_create", LocationManagerGetError(nRet));
- nRet = location_manager_clear_mock_location(hLocationManager);
+ nRet = location_manager_enable_mock_location(true);
+ if(nRet == LOCATIONS_ERROR_NONE)
+ nRet = location_manager_clear_mock_location(hLocationManager);
PRINT_RESULT_CLEANUP(TIZEN_ERROR_PERMISSION_DENIED, nRet, "location_manager_clear_mock_location", LocationManagerGetError(nRet), location_manager_destroy(hLocationManager));
location_manager_destroy(hLocationManager);