I am working on an app which uses cordova-plugin-geolocation service to track live location of logged in users. It works fine if app is in foreground. But when we minimize the app, it stops tracking after specific time(5 minutes or something). To resolve this problem , I change battery sever mode to “No restrictions” manually in phone.
So I am facing two major issues here -
- I can not change settings manually in each user’s phone. So please suggest if there is any way in ionic 4 to do this through code.
- When I change setting manually the app works fine, but android automatically kill the app during phone call or any kind of notification.
Please suggest me how can I fix the above problems .
Thanks in advance.