Geolocation not working when run on android device


#1

Iam using this https://github.com/apache/cordova-plugin-geolocation plugin,
when i run command “ionic lab”, it worked fine,

but when i deploy my application to my android device, it is not working, when running with default setting, it takes long time,
when i use custom setting
{enableHighAccuracy: false, timeout: 25000, maximumAge: 0}

it always show error result time out.

for your information, im using redmi note, kitkat


#2

Are you trying to get location from cellular network or from WIFI.
Double check your location service.


#3

sorry, i just found out, after i restarted my phone,

the problem is solved,

note: after using fake gps, geolocation couldnt get the current location, even though i already turn off fake gps apps,
i need to restart my phone for the geolocation to work again