Closed ramay2088 closed 3 years ago
well well well! here is solution Android 8+ don't allow continue watch user's location for longer period of time in order to do that we need to create foreground service.
I updated the documentation so it is more explicit.
Describe the bug I am using plugin
https://github.com/seididieci/capacitor-backround-geolocation to watch the user's location. then I am tracking that location with the help of a pusher. this background location works only for 5 minutes after that it just stops. I am using Capacitor's Background task. But that plugin also keeps data on phone after the user opens the app. the Background task sends data to the pusher.
Here is watch location function
Then calling function in mounted()
To Reproduce Steps to reproduce the behavior: just go in background it will work only for 5 minutes
Expected behavior It should keep send location on server
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information): Android 10