Open ShawnPavel opened 6 years ago
1.9.0-beta.3
released. Be sure to do this
@christocracy I finally got time to test out updating the app to 1.9.0-beta.4
. The good news is it no longer crashes! Unfortunately, I no longer get geofence events sent to my http endpoint in the background as I did before.
Is there anything special that changed with the newest version when setting up geofences to get it to send the http post like before?
I tested it out by starting at one geofence location, walking to another, waiting for a few minutes, and then walking back to the first.
Here's the emailLog
info.
{
"activityRecognitionInterval": 10000,
"allowIdenticalLocations": false,
"autoSync": true,
"autoSyncThreshold": 0,
"batchSync": false,
"debug": true,
"deferTime": 0,
"desiredAccuracy": 0,
"desiredOdometerAccuracy": 100,
"disableElasticity": false,
"disableStopDetection": false,
"distanceFilter": 10,
"elasticityMultiplier": 1,
"enableHeadless": true,
"enableTimestampMeta": false,
"extras": {
"date": 1541439204,
"isInBackground": false,
"isIos": false,
"userToken": "wAcF2QjJJtV2PkyrP5SxxdhE2YA3",
"pushToken": "dlsJMhKMJYw:APA91bFcbbS3PqZqb-u8kQ5lICTI9rko7s9K5PIl--ikrPoRgheW1_GIlXyqMjZ0GrM6v8cslo5fDiezILEbSIXfYJs_2f_zsz2i7QgH0YAV7Dt2H3kLFmwfHa4GJjFNFnnLcFYGht6o"
},
"fastestLocationUpdateInterval": 10000,
"forceReloadOnBoot": false,
"forceReloadOnGeofence": false,
"forceReloadOnHeartbeat": false,
"forceReloadOnLocationChange": false,
"forceReloadOnMotionChange": false,
"forceReloadOnSchedule": false,
"foregroundService": true,
"geofenceInitialTriggerEntry": true,
"geofenceProximityRadius": 1000,
"geofenceTemplate": "",
"headers": {},
"headlessJobService": "com.transistorsoft.backgroundgeolocation.HeadlessJobService",
"heartbeatInterval": 300,
"httpRootProperty": ".",
"httpTimeout": 60000,
"isMoving": false,
"locationTemplate": "",
"locationTimeout": 60,
"locationUpdateInterval": 1000,
"locationsOrderDirection": "ASC",
"logLevel": 5,
"logMaxDays": 3,
"maxBatchSize": -1,
"maxDaysToPersist": 1,
"maxRecordsToPersist": -1,
"method": "POST",
"minimumActivityRecognitionConfidence": 75,
"notificationColor": "",
"notificationLargeIcon": "",
"notificationPriority": -2,
"notificationSmallIcon": "",
"notificationText": "Locating nearby tasks! (Long press to hide notification.)",
"notificationTitle": "LiveShopper",
"params": {},
"persist": true,
"schedule": [],
"startOnBoot": true,
"stationaryRadius": 25,
"stopAfterElapsedMinutes": 0,
"stopOnStationary": false,
"stopOnTerminate": false,
"stopTimeout": 5,
"triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking",
"url": "https:\/\/fuzzy-dragonfly-73.localtunnel.me\/user-location",
"enabled": false,
"schedulerEnabled": false,
"trackingMode": 0,
"odometer": 81.15462493896484,
"isFirstBoot": false
}
And here's the log file: background-geolocation.log
There are no geofences firing in your logs. You will not get a geofence event sent to your end-point if no geofence events occur.
I did not change anything in my configuration, or implementation other than updating the plugin.
Is there anything special that changed with the newest version when setting up geofences to get it to send the http post like before?
I tested it out by starting at one geofence location, walking to another, waiting for a few minutes, and then walking back to the first.
It has nothing to do with HTTP. The geofences are not firing.
You can see in the logs that the geofences are being created and monitored. They are not firing.
I understand it has nothing to do with HTTP. I should have rephrased that when I asked it again.
Is there anything special that changed with the newest version when setting up geofences to get it to FIRE GEOFENCES like before?
To answer your questions:
0
or "HIGHEST POWER, HIGHEST ACCURACY"Here's one of the geofences:
{
"identifier": "-KxsBI2uRgLXppk8ogGT",
"radius": "100",
"latitude": 41.059098,
"longitude": -83.589661,
"notifyOnEntry": true,
"notifyOnExit": true,
"notifyOnDwell": true,
"loiteringDelay": 30000,
"extras": {
"location": "-KxsBI2uRgLXppk8ogGT",
"campaign": "-KwuecyexbJW5Z5fvuuP",
"user": "wAcF2QjJJtV2PkyrP5SxxdhE2YA3"
}
}
Is there anything special that changed with the newest version when setting up geofences to get it to FIRE GEOFENCES like before?
No.
These are set to 100
The docs are mistaken. It should read minimum is 200
. Change your radius to 200
.
t is never changed from the default value. W
I'm not talking about the plugin config. I'm talking about your Android Device Settings -> Location.
I updated it to 200. And the device is configured to use wifi for high accuracy GPS. Still no events.
My issue here is that it works when I run v1.8 but not 1.90-beta.4. If I downgrade to 1.8 and go for the exact same walk, I get geofence events firing without changing any configuration on my device or the plugin.
@christocracy I am coming back to this issue again after some time away working on other projects. I am still experiencing the issue above when running background geofences only. I do not see any geofence events firing for Android. I am still using the configuration above, but I am now using version 1.9.1 of the background-geolocation-lt plugin.
With the configuration provided above I receive ENTER
events on iOS almost instantly after creating the geofence. This is as I expected it to behave. I have tested with a walk, and a drive across town. I do not get any geofence events.
Here is a recent email log from my last test:
{
"activityRecognitionInterval": 10000,
"allowIdenticalLocations": false,
"autoSync": true,
"autoSyncThreshold": 0,
"batchSync": false,
"debug": true,
"deferTime": 0,
"desiredAccuracy": 100,
"desiredOdometerAccuracy": 100,
"disableElasticity": false,
"disableStopDetection": false,
"distanceFilter": 150,
"elasticityMultiplier": 1,
"enableHeadless": false,
"enableTimestampMeta": false,
"extras": {
"date": 1557342331,
"isInBackground": true,
"isIos": false,
"userToken": "mZQ01aaw3rbMV9YJ4wNfrd41yJo1",
"pushToken": "cnb6kT7lpKM:APA91bEP-ZbwC7rsYkJ2chu9ux9WC45TUxYxrtcCsicC1PgdsDaZ97H5YNCpMoJq9AwanPiLo5oCbtGrFcQjw6Ny7LNacuHx75yqwBKEPH9QGFPj_M-xkkDq-R90tWKB3fA5r4y4Nlvs"
},
"fastestLocationUpdateInterval": 10000,
"forceReloadOnBoot": false,
"forceReloadOnGeofence": false,
"forceReloadOnHeartbeat": false,
"forceReloadOnLocationChange": false,
"forceReloadOnMotionChange": false,
"forceReloadOnSchedule": false,
"foregroundService": true,
"geofenceInitialTriggerEntry": true,
"geofenceProximityRadius": 1000,
"geofenceTemplate": "",
"headers": {},
"headlessJobService": "com.transistorsoft.backgroundgeolocation.HeadlessJobService",
"heartbeatInterval": 300,
"httpRootProperty": ".",
"httpTimeout": 60000,
"isMoving": false,
"locationTemplate": "",
"locationTimeout": 60,
"locationUpdateInterval": 1000,
"locationsOrderDirection": "ASC",
"logLevel": 5,
"logMaxDays": 3,
"maxBatchSize": -1,
"maxDaysToPersist": 1,
"maxRecordsToPersist": 1,
"method": "POST",
"minimumActivityRecognitionConfidence": 75,
"notificationColor": "",
"notificationLargeIcon": "",
"notificationPriority": -2,
"notificationSmallIcon": "",
"notificationText": "Locating nearby tasks! (Long press to hide notification.)",
"notificationTitle": "LiveShopper",
"params": {},
"persist": true,
"schedule": [],
"startOnBoot": true,
"stationaryRadius": 100,
"stopAfterElapsedMinutes": 0,
"stopOnStationary": false,
"stopOnTerminate": false,
"stopTimeout": 5,
"triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking",
"url": "https:\/\/api.liveshopper.com\/v1-dev\/user-location",
"enabled": true,
"schedulerEnabled": false,
"trackingMode": 0,
"odometer": 36.359375,
"isFirstBoot": false
}
@christocracy Can you provide any insight as to why the geofence events aren't firing?
Your Environment
tns info
):Plugin config
Expected Behavior
The plugin will start monitoring geofence events on close.
Actual Behavior
When I call
BackgroundGeolocation.startGeofences
in the androidactivitiyStoppedEvent
the app crashesSteps to Reproduce
Context
I am attempting to only monitor geofences while the app is closed or in the background. I start the geofences when the app enters background. And also in the activity created event so that it starts when android restarts the app in the background. This worked fine before I updated the plugin to 1.8 and nativescript to ^3.4.
Debug logs