Comments (10)
Forget about react-native-geolocation
, it's no good. Tracking a device in the background is complex. If you want to track a device in the background, use my react-native-background-geolocation
it's the best you'l'l find. I've been working on this for almost 4 years.
My react-native-background-geolocation WILL continue tracking, even if user terminates the app.
from react-native-background-fetch.
If user terminates the app, fetch ceases.
If os terminates app (eg: due to memory pressure, fetch will not cease.
from react-native-background-fetch.
@christocracy Is there a way to have background fetching after app gets closed by user using other methods?
And did I miss these subtleties in your doc?
Thank you.
from react-native-background-fetch.
When user terminates the app, background fetch is ceased, period.
There is no hope for a background fetch to occur after user explicitly terminates the app.
from react-native-background-fetch.
Hey @christocracy, one last question for you.
Does having a background location fetch super seed your module? I ask this because I have both going on and I can see the geolocation refresh in the background but not your module. I left it running all night.
Thank you.
from react-native-background-fetch.
This is not background "location fetch". This module has nothing to do with location. It's merely an iOS mechanism that awakens an app in background, providing 30s of bg time.
No this module does not supercede background Geolocation, in fact it was designed as a dependency for it.
If simulate background fetch works in Xcode, that's all you need to know. Apple's fetch algorithm is a black box based upon usage behaviour. It's pointless to "wait" for fetch to occur. Just use the app like a user would and the algorithm will "learn" your behaviour and fetches will come.
from react-native-background-fetch.
Are you using my react-native-background-geolocation module for location?
https://github.com/transistorsoft/react-native-background-geolocation
from react-native-background-fetch.
Hello @christocracy thank you for your swift response and my apologies for the confusion from my end.
My initial goal was to have an app that keeps sending my geolocation to a firebase database.
I assumed that this could occur in the background even though the app was completely closed by user (which now I understand is not possible).
So now I am still trying to do the same thing but while having my app open but in the background and or while my screen is locked.
What I did to achieve this is to follow facebook react-native Geolocation which states "In order to enable geolocation in the background, you need to include the 'NSLocationAlwaysUsageDescription' key in Info.plist and add location as a background mode in the 'Capabilities' tab in Xcode." which I have.
Before getting some clarity from you about the inability to have background task run if the app is completely closed, I went ahead and tried to implement also your repo.
With both installed and having the app still open but in the background, I am only seeing the Geolocation fire very frequently (every 15 seconds or so) which gets reflected on firebase successfully, but I do not see any activity from yours.
So this is why I was wondering if the react-native Geolocation implementation super seeds your repo?
from react-native-background-fetch.
Thank you for the link, but $349... is a bit steep for a personal/non commercial app.
from react-native-background-fetch.
from react-native-background-fetch.
Related Issues (20)
- How register headless task in expo SDK 50 HOT 4
- Need to trigger long-running background task with help of foreground service(Notification) HOT 4
- [iOS] Multiple Simulated Events Fail - 'No launch handler registered for task with identifier' HOT 3
- Created in error
- I am getting event every minute even adding 15 minute in android HOT 2
- Cannot read property "configure" of null HOT 3
- 500 error when re-executing task HOT 1
- [QUESTION] I cant seem to figure out how to set up the background tasks HOT 5
- Javascript function only executed 1 time, the second run it doesn't execute HOT 4
- Can't run tasks in background in ios HOT 5
- [Getting this warning] "No task registered for key BackgroundFetch" HOT 5
- 'TSBackgroundFetch/TSBackgroundFetch.h' file not found HOT 7
- The Android Gradle plugin supports only kotlin-android-extensions Gradle plugin version 1.6.20 and higher. HOT 1
- Cannot read proprety configure on null. on expo setup HOT 12
- Can't enable "Alarms & Reminders" on Android 14. Version "4.2.5" HOT 4
- Stop working in background after 3-4 min HOT 3
- Works while USB debugging, but not in the installed app through generated .apk file HOT 6
- [Need help in understanding Error codes] - Production app giving errors with react-native-background-fetch HOT 3
- React Native Background Actions - App is Not Running in Background All the Time HOT 1
- Background Location Tracking Stops Working After Some Time When App is Killed or in Background. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-background-fetch.