Cannot get geolocation points on android

I am trying to get geolocation object and every time I get the TIMEOUT_EXPIRED error. The permission setup correctly.
navigator.geolocation.getCurrentPosition(function(position) {
location.lat = position.coords.latitude;
location.lng = position.coords.longitude;
checkin(location);
}, function (error) {
alert(error.message);
}, { timeout: 10000, enableHighAccuracy: true }

AndroidManifest:
uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"
uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"
uses-permission android:name=“android.permission.ACCESS_LOCATION_EXTRA_COMMANDS”

On iOS everything is working fine.

do you have this problem on emulator or actual device?

i have these problems on an emulator too.

On emulator I have ability to send geolocation data manually. I have problems on android 5+

this seams to be a known problem, if you set a timeout in the geolocation options this will be triggered. you can send the Posistion in emulator options this works for google.com/maps/

or you can telnet localhost 5554 to the device and

geo fix Long Lat

to set a position, but i can’t grab it in my app ios no problems, and real android also no problems, this is a 4.4 Kitkat device

I have problems with geolocation on android 5+

1 Like

Geolocation isnt working for me as well.