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
Hi @theobouwman ,to achieve what you're asking, you would need to listen for AppStateChange and then do what you require, when the AppState is in the background. Refer to this: https://reactnative.dev/docs/appstate
@aqil07 how would you use this? do we call watchPosition twice then? Once in foreground once in background?
(on a sidenote, my research has pointed me in the direction of "foreground via persistent notification" which is the correct solution. From a user POV apps should be informing users that they are running still, I just didn't know that the app itself has to spawn that notification)
Can I use this when I force close the app? Or have not even opened the app at all?
I want to track user location and maken api calls in the background.
The text was updated successfully, but these errors were encountered: