Closed lane4-wiz closed 1 month ago
Post your code
"enabled": false,
Your logs show you’re not calling .start().
check Your code.
useEffect(() => {
if (drvIdx) {
if (isLocationTracking) return;
BackgroundGeolocation.start().then(() => {
console.log('- BackgroundGeolocation started successfully');
});
} else {
BackgroundGeolocation.stop().then(() => {
console.log('- BackgroundGeolocation stopped successfully');
});
}
}, [drvIdx]);
Yes, check your logic. The logs say that’s not being executed.
The location information of the remaining 50 or more articles is being collected successfully using the same code, but the problem is only occurring in that article.
When in doubt, do a test by executing .start() right here
.then(state => {
console.log('- BackgroundGeolocation is configured and ready: ', state.enabled);
})
your logs clearly say the plug-in is enabled: false
. You will not see locations recorded until the plug-in is enabled: true
Your Environment
react-native -v
): 0.72.6Expected Behavior
Actual Behavior
Steps to Reproduce
1. 2. 3. 4.
Context
Debug logs
Logs
``` 10-07 13:29:40.002 INFO [LoggerFacade$a a] ╔═════════════════════════════════════════════ ║ TSLocationManager version: 3.5.5 (434) ╠═════════════════════════════════════════════ ╟─ samsung SM-S908N @ 14 (react) { "activityRecognitionInterval": 10000, "allowIdenticalLocations": true, "authorization": {}, "autoSync": true, "autoSyncThreshold": 0, "backgroundPermissionRationale": { "title": "백그라운드에서 위치에 액세스하도록 허용합니다.", "message": "백그라운드에서 위치를 추적하려면 {backgroundPermissionOptionLabel} 위치 권한을 활성화하세요.", "positiveAction": "{backgroundPermissionOptionLabel} 활성화", "negativeAction": "취소" }, "batchSync": false, "configUrl": "", "crashDetector": { "enabled": false, "accelerometerThresholdHigh": 20, "accelerometerThresholdLow": 4.5, "gyroscopeThresholdHigh": 20, "gyroscopeThresholdLow": 4.5 }, "debug": false, "deferTime": 0, "desiredAccuracy": -1, "desiredOdometerAccuracy": 100, "disableAutoSyncOnCellular": false, "disableElasticity": false, "disableLocationAuthorizationAlert": false, "disableMotionActivityUpdates": false, "disableProviderChangeRecord": false, "disableStopDetection": false, "distanceFilter": 10, "elasticityMultiplier": 1, "enableHeadless": false, "enableTimestampMeta": false, "extras": { "driverId": 649, "carId": 125, "allocationId": 0 }, "fastestLocationUpdateInterval": -1, "foregroundService": true, "geofenceInitialTriggerEntry": true, "geofenceModeHighAccuracy": false, "geofenceProximityRadius": 1000, "geofenceTemplate": "", "headers": {}, "headlessJobService": "com.transistorsoft.rnbackgroundgeolocation.HeadlessTask", "heartbeatInterval": 60, "httpRootProperty": "location", "httpTimeout": 60000, "isMoving": true, "locationAuthorizationRequest": "Always", "locationTemplate": "", "locationTimeout": 60, "locationUpdateInterval": 1000, "locationsOrderDirection": "ASC", "logLevel": 5, "logMaxDays": 3, "maxBatchSize": -1, "maxDaysToPersist": 1, "maxMonitoredGeofences": 97, "maxRecordsToPersist": -1, "method": "POST", "minimumActivityRecognitionConfidence": 75, "motionTriggerDelay": 0, "notification": { "layout": "", "title": "[LANE4 드라이버]", "text": "", "color": "", "channelName": "TSLocationManager", "channelId": "", "smallIcon": "", "largeIcon": "", "priority": -1, "sticky": false, "strings": {}, "actions": [] }, "params": {}, "persist": true, "persistMode": 2, "schedule": [], "scheduleUseAlarmManager": false, "speedJumpFilter": 300, "startOnBoot": true, "stationaryRadius": 25, "stopAfterElapsedMinutes": 0, "stopOnStationary": false, "stopOnTerminate": false, "stopTimeout": 5, "triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking", "url": "https:\/\/monitoring-api.lane4.ai\/location", "useSignificantChangesOnly": false, "enabled": false, "schedulerEnabled": false, "trackingMode": 1, "odometer": 0, "isFirstBoot": false, "didLaunchInBackground": false, "didDeviceReboot": false } 10-07 13:29:40.003 INFO [LoggerFacade$a a] ╔═════════════════════════════════════════════ ║ DEVICE SENSORS ╠═════════════════════════════════════════════ ╟─ ✅ ACCELEROMETER: {Sensor name="lsm6dso LSM6DSO Accelerometer Non-wakeup", vendor="STMicro", version=15933, type=1, maxRange=78.4532, resolution=0.0023928226, power=0.17, minDelay=5000} ╟─ ✅ GYROSCOPE: {Sensor name="lsm6dso LSM6DSO Gyroscope Non-wakeup", vendor="STMicro", version=15933, type=4, maxRange=17.453018, resolution=6.108648E-4, power=0.55, minDelay=5000} ╟─ ✅ MAGNETOMETER: {Sensor name="ak0991x AK09918 Magnetometer Non-wakeup", vendor="akm", version=146988, type=2, maxRange=4912.0503, resolution=0.15, power=1.1, minDelay=10000} ╟─ ✅ SIGNIFICANT_MOTION: {Sensor name="smd Wakeup", vendor="Samsung", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.001, minDelay=-1} ╚═════════════════════════════════════════════ 10-07 13:29:40.072 DEBUG [TSSQLiteAppender$c run] ℹ️ Cleared logs older than 72 hours 10-07 23:38:35.120 DEBUG [LifecycleManager onCreate] ☯️ onCreate 10-07 23:38:35.121 DEBUG [LifecycleManager onStart] ☯️ onStart 10-07 23:38:35.122 INFO [BackgroundGeolocation