Geolocation seems not to be working on Android (NS 3.0.1)


#1

Both functions getLocation and watchLocation (from the documentation page) were working fine on my app while I was using NS 2.5.0. As soon as I’ve updated it, iOS is still working fine but Android stopped to update the location.

Any ideas?
Thanks!

Alex


#2

There is a breaking change for geolocation:

Location

The location module is removed. Use nativescript-geolocation plugin instead.


#3

Randy, this is exactly what I am using (nativescript-geolocation 3.0.0). However, although it is working fine on my iPhone, it is not the case on my Android device.


#4

I had an issue where I was not requesting permission.
https://docs.nativescript.org/hardware/location

 if (!geolocation.isEnabled()) {
        geolocation.enableLocationRequest();
    }

Have you tried this?