I am getting old coordinates whenever i try to get new current coordinates. The coordinates only update if i restart my application. I am testing application on real android mobile. I did “maximumAge” to 0, which means it will always give me updated location not from cache. Now i am out of ideas and don’t know what to do next.
import { Geolocation } from '@ionic-native/geolocation';
getCurrentCoordinates() {
return this.geolocation.getCurrentPosition({ timeout: 10000, enableHighAccuracy: true, maximumAge: 0 })
.then((resp) => {
return resp.coords;
})
.catch((error) => {
console.log('Error getting currrent coordinates'+ error);
});
}