-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to get the user location at regular intervals when app in background using onHeartbeat #2032
Comments
Periodic event-handling is precisely what the background-fetch plugin is for. See its readme. heartbeat should be avoided. |
We have tried background-fetch initially but it didn't give any output in testing phase. and also in the readme it says: Hence we were doubtful about getting locations regularly. I will retry and share the implementation today. |
Read the readme for background-fetch and learn how to simulate events. When simulated events fire, that’s all you need to know, that everything is operating correctly. It works fine; no need to “doubt”. |
I have gone through the readme. I don't see anything mentioned for android similar to simulate events in iOS. Do we have something to test on android as well? |
|
If you have a question about background-fetch, please seek support by posting an issue there. Also, please learn to syntax highlight “fenced code blocks |
Your Environment
react-native -v
): Expo 50.0.18Expected Behavior
Need to capture user location at 14 mins interval for longer durations like 8-9 hours. On both android and iOS. And save to app local storage. There is high possibility for the device to be stationary (left on desk) for longer durations. that means, the app should get data in background mostly and I am also using geoFence in addition to it. Any additional suggestions to achieve the above helps
Actual Behavior
App provides location values ones or twice while in background not more than that. later i think the app is terminated and geoFence isn't giving consistent enter/exit. At times I see records and at times I don't, with the same app on multiple tests.
The text was updated successfully, but these errors were encountered: