transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.61k stars 427 forks source link

Tracking in the background stops automatically #599

Closed bobthebuilderio closed 5 years ago

bobthebuilderio commented 5 years ago

Your Environment

Expected Behavior

I have configured a headless task for when the app is killed, and a heartbeat listener for when the app is in foreground. The app as you can see above is configured to reload in case of the app got killed Both the Heartbeat & the headless tasks after sometime become inactive. I am using them to check on data and location and issue a notification and to refresh my token each 30 min from it being updated. So the way I know they become disabled, is that I try to turn off location per say and no notification appears. Tracking keeps working for a bit more... but dies after some time, the bar in the notification section disappears as if the whole thing just died. The app is still open in the background though.

Actual Behavior

Heartbeats are not stable and cannot rely on them Headless task is terminating Geolocation is also terminating after sometime

Steps to Reproduce

1. 2. 3. 4.

Context

Track my fleet of drivers

Debug logs

rmamtaventures commented 4 years ago

Thanks a lot for your support. Reset re-apply its persisted configuration with each boot of application. But with this app work on background and foreground. I removed this and now my app is working on kill also in some devices. It's not working on MI.