I’m using the Capacitor Geolocation plugin to display the user’s continuous position on a map. I don’t necessarily need its location to be tracked when the phone is sleeping (locked) but I need the location to be accurate and continuous when the user opens their phone/app again (wakeup/unlock).
So, it works but I have a strange problem after the wake up: the “watchPosition” returns the coordinates but those of the place where I locked the phone and not the place where I am currently (while I moved several dozen meters. Do you have an idea why and maybe how I can fix it to get only the coordinates of the reel and current position?
Currently, If I wait a long time and walk around the new position, I get the right coordinates but this is totally random (of time) and, if I open another navigation app (such as Waze or Google Maps) and then go back to my app, the location is then right.
Has anyone encountered the same issue?
Can someone help me to find a solution with this package or with another?