Open Stophface opened 3 years ago
You can use react-native-background-fetch library to execute task in background.
@Agontuk Thanks for this awesome library, doesn't watchPosition also run in the background?
Not by default, you have to use some kind of work scheduler to request location in background. react-native-background-fetch
should do the trick as far as I know.
here is iOS solution:
Required background modes
and expand it App registers for location updates
Done~
here is iOS solution:
- open iOS project
- open info.plist
- add
Required background modes
and expand it- add
App registers for location updates
Done~
Does this eliminate the 15 minutes fetch limit?
Is there a code example of how to get the location data when the app runs in the background?