-
Notifications
You must be signed in to change notification settings - Fork 0
QA: Location Uploading: React Native Background Geolocation
Rebecka Z edited this page Apr 20, 2018
·
1 revision
Note: This is a reference doc per react-native-background-geolocation library. Last updated April 13, 2018
- Tracking ends after user "kills" the app.
- Low battery mode (yellow battery) affects location uploads. It turns off background app refresh.
- Library has a default confidence level of 75% (?) for
minimumActivityRecognitionConfidence
, can change it to trigger a state-change. -
preventSuspend
, default isfalse
, it's meant to prevent iOS from suspending the app while in background in stationary state. It is used in conjunction with #heartbeatInterval - Per the specs below, the device will be detected to be
moving
when it moves 25 meters (82 feet) in 10 seconds or more. However, location uploads will not be sent until the app moves 5 more meters (due to thedistanceFilter
being 30 meters). While the app is notkilled
/suspended
.
- When the device is detected to be moving, the plugin will automatically start recording a location according to the configured distanceFilter (meters).
- When the device is detected be stationary, the plugin will automatically turn off location-services to conserve energy.
- | - |
---|---|
default radius | 50 meters, 100 meters in diameter |
meters | feet | miles |
---|---|---|
25 m | = 82 ft | = 0.01 mi |
30 m | = 98 ft | = 0.01 mi |
50 m | = 164 ft | = 0.03 mi |
100 m | = 328 ft | = 0.06 mi |
ms | sec |
---|---|
1000 ms | 1 sec |
10,000 ms | 10 secs |
- | - |
---|---|
desiredAccuracy | highest power, highest accuracy (0) and lowest power, lowest accuracy (1000); location providers: GPS + Wifi + Cellular, Highest power; highest accuracy |
distanceFilter | minimum distance (in meters) a device must move horizontally before an update event is generated (default is 10m) |
stationaryRadius | When stopped, the min. distance the device must move beyond the stationary location for aggressive background-tracking to engage (default is 25m) |
activityType | Presumably, this affects ios GPS algorithm. See here "CLLocationManager" for more info. (default is ACTIVITY_TYPE_OTHER ) |
activityRecognitionInterval | The desired time between activity detections. Larger values will result in fewer activity detections while improving battery life. A value of 0 will result in activity detections at the fastest possible rate. (default is 10,000ms ~ 10 seconds) |
activitychange | Fired when the activity-recognition system detects a change in detected-activity (still, on_foot, in_vehicle, on_bicycle, running ) |
- | - |
---|---|
Not Running | Not launched/terminated by system |
Inactive | Running in foreground (transitional) |
Active | Receiving events |
Background | Executing code |
Suspended | Not executed, remains in memory |
This view (only available on Staging) is aimed at helping QA understand when/how location updates are getting sent to the backend. We use react-native-background-geolocation to do the heavy lifting and most of the values on the Location Debug screen reflect configuration settings on that module.
Toggle debug mode on react-native-background-geolocation
When activated, this will play a "tweet" sound whenever a location update has successfully been sent to our backend. If the request failed it will play a different, more "ominous" sound.