transistorsoft / cordova-background-geolocation-SampleApp

Cordova Background Geolocation Sample Application
https://www.transistorsoft.com/shop/products/cordova-background-geolocation
MIT License
122 stars 78 forks source link

Locations are not captured at frequent intervals. #117

Open abhibly opened 5 years ago

abhibly commented 5 years ago

Hello,

I have to track my employees working in remote locations every 5 minutes when the device is idle or in motion. I have set heartbeatInterval to 300 seconds. So I am expecting the location to be captured every 5 minutes. The problem is, I am not getting employee locations at regular intervals. The app didn't return any location for 1 hour. Here is an example data of employee I tracked: http://tracker.transistorsoft.com/vishwa7?device=Cordova-Redmi-4A&end=2019-10-18&start=2019-10-18

And I have attached the log file: background-geolocation.log

Can somebody please tell me why the locations are not returned at regular intervals? How can I get the location of employee at regular intervals if the device is idle or in motion?

Below is the configuration I used to track:

{
    "activityRecognitionInterval": 10000,
    "allowIdenticalLocations": false,
    "autoSync": true,
    "autoSyncThreshold": 0,
    "batchSync": false,
    "debug": true,
    "deferTime": 0,
    "desiredAccuracy": 0,
    "desiredOdometerAccuracy": 100,
    "disableElasticity": true,
    "disableLocationAuthorizationAlert": false,
    "disableStopDetection": false,
    "distanceFilter": 0,
    "elasticityMultiplier": 1,
    "enableHeadless": true,
    "enableTimestampMeta": false,
    "extras": {},
    "fastestLocationUpdateInterval": 300000,
    "forceReloadOnBoot": false,
    "forceReloadOnGeofence": false,
    "forceReloadOnHeartbeat": false,
    "forceReloadOnLocationChange": false,
    "forceReloadOnMotionChange": false,
    "forceReloadOnSchedule": false,
    "foregroundService": true,
    "geofenceInitialTriggerEntry": true,
    "geofenceModeHighAccuracy": false,
    "geofenceProximityRadius": 1000,
    "geofenceTemplate": "",
    "headers": {},
    "headlessJobService": "com.transistorsoft.cordova.bggeo.BackgroundGeolocationHeadlessTask",
    "heartbeatInterval": 300,
    "httpRootProperty": "location",
    "httpTimeout": 60000,
    "isMoving": false,
    "locationAuthorizationRequest": "Always",
    "locationTemplate": "",
    "locationTimeout": 60,
    "locationUpdateInterval": 300000,
    "locationsOrderDirection": "ASC",
    "logLevel": 5,
    "logMaxDays": 3,
    "maxBatchSize": -1,
    "maxDaysToPersist": 14,
    "maxRecordsToPersist": -1,
    "method": "POST",
    "minimumActivityRecognitionConfidence": 75,
    "notification": {
        "layout": "",
        "title": "cordova-background-geolocation",
        "text": "Tracking engaged",
        "color": "",
        "channelName": "TSLocationManager",
        "smallIcon": "",
        "largeIcon": "",
        "priority": 0,
        "strings": {},
        "actions": []
    },
    "params": {
        "device": {
            "model": "Redmi 4A",
            "platform": "Android",
            "uuid": "Redmi-4A",
            "version": "7.1.2",
            "manufacturer": "Xiaomi",
            "framework": "Cordova"
        }
    },
    "persist": true,
    "persistMode": 2,
    "schedule": [],
    "scheduleUseAlarmManager": false,
    "speedJumpFilter": 300,
    "startOnBoot": true,
    "stationaryRadius": 25,
    "stopAfterElapsedMinutes": 0,
    "stopOnStationary": false,
    "stopOnTerminate": false,
    "stopTimeout": 1,
    "triggerActivities": "in_vehicle,on_bicycle,on_foot,running,walking",
    "url": "http:\/\/tracker.transistorsoft.com\/locations\/vishwa7",
    "useSignificantChangesOnly": false,
    "enabled": true,
    "schedulerEnabled": false,
    "trackingMode": 1,
    "odometer": 0,
    "isFirstBoot": true,
    "didLaunchInBackground": false
}
christocracy commented 5 years ago

See http://dontkillmyapp.com