This issue is frequently occuring for me now, I am not sure why, but now I 
can't get fix it, here are the steps I take to reproduce it:
```
cordova create test --id "com.test.test" --name "test"
cd test
cordova plugin add cordova-plugin-geolocation
```
Delete everything in the init.js and replace with:
```
document.addEventListener("deviceready",function(){
        getGps();
},false);
function getGps(){
        navigator.geolocation.getCurrentPosition(gpsSuccess, 
gpsError,{timeout:5000,maximumAge:10000,enableHighAccuracy:true});
}
function gpsSuccess(position) {
        alert('Success');

}
function gpsError(error) {
        alert('GPS Error: code: 
'+error.code+'\n'+'message:'+error.message+'\n');
        getGps();
}
```
```
cordova platform add [email protected]
cordova run android
```

Turn Location on before running the application, you will see it works.
Exit the application.
Turn Location off.
Re-enter the application.
Wait for the timeout alert.
Turn Location on.
Notice that the application never accesses the location.

Tested on Android 8.0.0 and 5.0.1



[ Full content available at: 
https://github.com/apache/cordova-plugin-geolocation/issues/109 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to