Closed ArjenLammers closed 3 years ago
Why are you providing empty string to a bunch of properties which are defined as Object
?
Eg: params: ''
. That requires an {}
!
You're doing that multiple times.
I fixed this issue through: yarn add react-native-background-fetch@4.0.1.
Found the changelog of Chris here: https://github.com/transistorsoft/react-native-background-fetch/blob/master/CHANGELOG.md
Hope it helps.
Hi, thanks for the fast response. Changing the configuration to
{ locationAuthorizationRequest: 'Always', fastestLocationUpdateInterval: 300000, url: 'http://192.168.1.XX:8080/rest/event/v1/event/add', geofenceModeHighAccuracy: true, disableStopDetection: true, geofenceProximityRadius: 1000, maxRecordsToPersist: -1, debug: true, batchSync: true, showsBackgroundLocationIndicator: true, logLevel: 4, method: 'POST', stopDetectionDelay: 0, desiredAccuracy: -1, stopTimeout: 5, deferTime: 0, foregroundService: true, elasticityMultiplier: 1, stationaryRadius: 25, desiredOdometerAccuracy: 100, locationOrderDirection: 'ASC', activityType: 1, httpRootProperty: 'location', maxBatchSize: 1, logMaxDays: 3, startOnBoot: true, geofenceInitialTriggerEntry: true, autoSyncThreshold: 0, headers: { Token: ‘XXXXXXX’ }, maxDaysToPersist: 10, allowIdenticalLocations: true, locationUpdateInterval: 450000, autoSync: true, heartbeatInterval: 60, stopAfterElapsedMinutes: 0, distanceFilter: 0, httpTimeout: 60000 }
Made the library work. Not sure which specific setting was the culprit.
Your Environment
react-native -v
): 0.61.5{ locationAuthorizationRequest: 'Always', fastestLocationUpdateInterval: 300000, url: 'http://192.168.1.XX:8080/rest/event/v1/event/add', geofenceModeHighAccuracy: true, disableStopDetection: true, geofenceProximityRadius: 1000, maxRecordsToPersist: -1, debug: true, preventSuspend: false, batchSync: true, useSignificantChangesOnly: false, disableElasiticity: false, showsBackgroundLocationIndicator: true, disableLocationAuthorizationAlert: false, logLevel: 4, method: 'POST', stopDetectionDelay: 0, desiredAccuracy: -1, stopTimeout: 5, geofenceTemplate: '', deferTime: 0, foregroundService: true, elasticityMultiplier: 1, params: '', stationaryRadius: 25, stopOnTerminate: false, desiredOdometerAccuracy: 100, locationOrderDirection: 'ASC', activityType: 1, httpRootProperty: 'location', maxBatchSize: 1, schedule: '', logMaxDays: 3, locationTemplate: '', startOnBoot: true, geofenceInitialTriggerEntry: true, extras: '', autoSyncThreshold: 0, headers: { Token: 'XXXXX' }, maxDaysToPersist: 10, stopOnStationary: false, allowIdenticalLocations: true, locationUpdateInterval: 450000, autoSync: true, heartbeatInterval: 60, enableHeadless: false, stopAfterElapsedMinutes: 0, distanceFilter: 0, httpTimeout: 60000 }