Cordova's Geolocation API is not working on Android device running with Android M beta OS. While other API's like network, device, camera, etc.. works fine in this beta OS. Only GeoLocation API doesn't work. Is this is an API issue? (location option was enabled under Settings>App_Name>Permissions. But my app is not shown under Settings>Location)
Note: Geolocation App works fine on the same app, installed over Android 5 & below OS versions.
I am using Cordova CLI version 4.3.0.
geolocation.getCurrentLocation fails with error as "User denied geolocation".where as i haven't denied any location tracking permission on device.
Below is my code snippet to get current location
window.navigator.geolocation.getCurrentPosition(
function (position) {
log("got the location " + position);}
function (error) {
self.showErrorMessage(NO_LOCATIONS_FOUND);
switch(error.code)
{
case error.PERMISSION_DENIED:
logErr("User denied the request for Geolocation.");
break;
case error.POSITION_UNAVAILABLE:
logErr("Location information is unavailable.");
break;
case error.TIMEOUT:
logErr("The request to get user location timed out.");
break;
case error.UNKNOWN_ERROR:
logErr("An unknown error occurred.");
break;
}
findBranchView.showNoLocationServiceMessage();
},
{
//for reference
//https://groups.google.com/forum/#!topic/phonegap/ESrHAjFHgFU
//http://www.badrit.com/blog/2013/9/25/javascript-and-geolocation-tricks
enableHighAccuracy: true,
timeout: 30000
}
);
Thanks in advance.
--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
For more info on PhoneGap or to download the code go to www.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
confirmed on my Nexus 9 with M
--