Tizen location infromation unavailable

When I trying to get the location information like lat and long every time gives location information unavailable error. is it possible to get the location information from Tizen web API without pairing the phone? because I’m developing a standalone application and I just need to get details from my watch location settings.

below is the detail of what I did.
added the below privilege to the config file using the privileges tab first.

http://tizen.org/privilege/location

Then I make permission flow to enable the location for my standalone watch app.

// use to ask permission for the location
function findLocation(askPermission) {
	
	var permisson_status = tizen.ppm.checkPermission("http://tizen.org/privilege/location");
	
	if (askPermission && permisson_status === 'PPM_ASK') {
		
		tizen.ppm.requestPermission("http://tizen.org/privilege/location", function(e) {
			if (e === 'PPM_DENY_ONCE') {
				
			} else if (e === 'PPM_ALLOW_FOREVER') {
				return callGeoLocationService();
			}
		})
		
	} else if (permisson_status === 'PPM_ALLOW') {
		callGeoLocationService();
	}
}

// call geolocation service
function callGeoLocationService() {
	if (navigator.geolocation) {
		
        navigator.geolocation.getCurrentPosition(
        		locationSuccessCallback, locationErrorCallback,{enableHighAccuracy: true,maximumAge: 0,timeout: 10000}
        );
    } else {
        console.log('Geolocation is not supported.');
    }
}

// when process success
function locationSuccessCallback(position) {
	
    console.log([position.coords.latitude,position.coords.longitude]);
}

// when process error
function locationErrorCallback(error) {
   
    switch (error.code) {
        case error.PERMISSION_DENIED:
            console.log('User denied the request for Geolocation.');
            break;
        case error.POSITION_UNAVAILABLE:
        		console.log('Location information is unavailable.');
            break;
        case error.TIMEOUT:
        		console.log('The request to get user location timed out.');
            break;
        case error.UNKNOWN_ERROR:
        		console.log('An unknown error occurred.');
            break;
    }
}

but unfortunately, my issue was not resolved to enable permissions too. and then I tried to manually enable location permissions from watch settings. same no success there. it’s not getting the GPS details. anyone can support this? it will be helpful to the community if you can provide the code snippets. Thanks!

First try to get location at all. Compile below Tizen 4. Since Tizen 4 app has to handle permissions.

Then you can use this code:

	 var options = {
             enableHighAccuracy: false,
             maximumAge: 1000 * 15,
             timeout: 20000,
     };
     try {
    	 _locationID = navigator.geolocation.watchPosition(onLocationChanged, onLocationError, options);
     } catch(e) {
    	 alert('Geolocation Error: ' + e.message + " [" + e.name + "]");
     }

function onLocationChanged(pos) {
    var your_coordinates = pos.coords;

}
function onLocationError(error) {
console.error('error msg ' + error.message);
}

it definitely works. After that try with Tizen 4 and add permission handling and check errors then if any.