You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to continuously track the user's live location in my app. I've implemented this functionality using expo-location and expo-task-manager, following a reference example. After deploying the app to the Google Play Store and conducting tests, we discovered that while the app is in the foreground, we successfully receive the user's live location. However, when the app is minimized or running in the background, we no longer receive live location updates. Could you provide any guidance or reference code to ensure that we can consistently obtain the user's live location even when the app is running in the background?
background-fetch:
We've implemented background-fetch to retrieve the user's live location every minute while the app is running in the background. However, our goal is to receive location updates at least every 10 seconds.
I was facing the same issue. Found out that the JavaScript process might be suspended by the OS when the app is not in foreground, so probably nothing can be done on the Expo end. My solution was to cache the collected GPS data and send them when possible.
Summary
Hello,
I need to continuously track the user's live location in my app. I've implemented this functionality using expo-location and expo-task-manager, following a reference example. After deploying the app to the Google Play Store and conducting tests, we discovered that while the app is in the foreground, we successfully receive the user's live location. However, when the app is minimized or running in the background, we no longer receive live location updates. Could you provide any guidance or reference code to ensure that we can consistently obtain the user's live location even when the app is running in the background?
background-fetch:
We've implemented background-fetch to retrieve the user's live location every minute while the app is running in the background. However, our goal is to receive location updates at least every 10 seconds.
Reference code:
https://docs.expo.dev/versions/latest/sdk/task-manager/
https://docs.expo.dev/versions/latest/sdk/background-fetch/
https://arnav25.medium.com/background-location-tracking-in-react-native-d03bb7652602#:~:text=The%20task%20of%20location%20tracking,or%20stop%20tracking%20your%20location.
Link to the related docs page
https://docs.expo.dev/versions/latest/sdk/task-manager/
Anything else?
No response
The text was updated successfully, but these errors were encountered: