Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Geolocation getCurrentPosition continuously fails if first try fails on android

$
0
0

In my ionic app i wanna use geolocation with the plugin https://github.com/apache/cordova-plugin-geolocation.

If i start the app (HTC One M7 with Android 4.4.4) with Location enabled, everything works fine (getCurrentPosition and watchPosition).

If Location is disabled and you try to ask for geolocation with watchPosition or getCurrentPosition, you get an error as expected.
But after that, when you enable Location on the device, you get the same error again if you try to check geolocation.

You can check this example [https://github.com/xelita/angular-cordova-plugins-sample].

Don't know, if it's the same on iOS.

Thanks for help!


Viewing all articles
Browse latest Browse all 228595

Trending Articles