Geolocation plugin not working on Android


#1

I can’t get the ionic cordova Geolocation plugin to work on Android or on browsers, though the same code works on iOS. The getCurrentPosition method can’t access the location even after I’ve given permission.
On android, the getCurrentPosition never returns unless I add a timeout parameter, after which it returns the error “Timeout expired.”

Here is my Ionic/system info:
@ionic/cli-utils : 1.12.0
ionic (Ionic CLI) : 3.12.0
cordova (Cordova CLI) : 7.0.1
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3 browser 4.1.0 ios 4.4.0
Ionic Framework : ionic-angular 3.6.1
cordova-plugin-geolocation: 2.4.3
OS : OS X El Capitan