Geolocation doesn't work in Android 6.0 (API 23+)



  • Hi!
    As you know, Android API 23 changed the way permissions are requested.
    Unfortunately, it seems this broke Monaca and/or cordova geolocation plugin because
    navigator.geolocation.watchPosition() always returns a timeout error (code 3). Everything works fine in previous API levels and iOS.

    I’ve checked and double checked and the app has the right permissions: the first time the app is run the user selects if he agrees to give access to location. Settings->Apps->Permissions shows location (fine and coarse).

    I’ve tried setting enormous timeouts or timeout=0, change the maximumAge, enableHighAccuracy true and false, Settings->Location GPS and device, etc, etc, nothing works.

    Has someone been able to solve this?


Log in to reply