Closed gaurav07june closed 3 years ago
Have you read the API docs for Config.stopOnTerminate?
I have set stopOnTerminate: false, which will enable tracking in background. Also, I have defined stationaryRadius: 27, which would, I think, will create a geofence of 27 meter radius. Now when I cross this 27 meter geofence, it should update the location, but it is not even I move for kilometers. Am I using some wrong config . Can u please guide me regarding this?
Also, I have defined stationaryRadius: 27, which would, I think, will create a geofence of 27 meter radius
No. The minimum stationaryRadius
that iOS will respond to is 200
meters. You can set it 0
, it won't matter.
After terminating an iOS app, tracking will not resume until the device moves a minimum of 200
meters. There is no "workaround". This is a fact of life with iOS.
I suggest you test in the iOS simulator with debug: true
and simulate location with Freeway Drive.
Thanks for you suggestion chris, I'll try this way. Just for a check, I was using another application for background location tracking simultaneously with my app. And there was not a single deviations in the path for that app while my app was showing long straight lines. Both were facing same device or location conditions.
It’s impossible for any iOS app to not have its tracking disrupted by at least 200 meters after app terminate.
When the app is in foreground it works fine but when the app is killed either by user or by OS, don't get the location update.
react-native -v
): "0.61.3"componentDidMount(){
}
Expected Behavior
It should fetch location in app killed state too.
Actual Behavior
When the app is killed , getting no location data
Context