I have some issues with a phonegap application using the geolocation of the user. Everytime the page is opened in the app, we get the following message
It would be nice, to prevent the app of showing this hint.
We use Cordova 1.9, PhoneGap Build and have set the right in the config.xml to access the position:
<feature name="http://api.phonegap.com/1.0/geolocation"/>
We cannot make deep changes in the objectiv-c code like described here because we use PhoneGap Build!
My code looks like the following...
function onDeviceReady() {
// get position
if (watchId == null) {
killWatcher();
window.setTimeout(function() {
navigator.geolocation.getCurrentPosition(updateUserPosition, log, {
enableHighAccuracy: false
});
watchId = navigator.geolocation.watchPosition(updateUserPosition, onGPSError, {
frequency : 5000,
maximumAge : 30000,
enableHighAccuracy : true
});
localStorage.setItem("watchID", watchId);
}, 1000);
}
}
The function listens on the ondeviceready event.
Does anyone have an idea how to fix that?
Thank you!