in my Cordova app, I'm trying to get the user's location from GPS. I use the geolocation plugin for this . Every 10 seconds I need to find a place. I am doing something like:
navigator.geolocation.getCurrentPosition(
$rootScope.onSuccessForLocation,
$rootScope.onErrorForLocation_High,
{maximumAge:600000, timeout:7000, enableHighAccuracy: true}
);
Now that this code works, it gives me a place in the callback method, but it does not follow from GPS, because when the application starts, the GPS icon appears and starts to flash in the status bar. But this does not happen. I had an old application that uses the same plugin. When I launch this application, the GPS icon starts flashing. The only thing that I have noticed so far is that in the old application I see the Geolocation.java file in the Android project, but there is no such file in the last plugin, even I tried to find it in the Github source folders. Now I do not know what is missing on my side. Does anyone know what is going on?
source
share