Closed lkknguyen closed 5 years ago
Are you using #start
or #startGeofences
?
To the plugin's database, everything is a location, including geofences. A geofence event is just a location with a geofence
object attached.
As for heartbeat
events, the plugin doesn't persist those.
If you use maxRecordsToPersist: 1
and lose network connectivity, you will lose geofence events.
You might be interested in the new Config.geofenceModeHighAccuracy
.
I'm using startGeofences
if you use maxRecordsToPersist: 1 and lose network connectivity, you will lose geofence events.
I thought maxRecordsToPersist and locationsOrderDirection: DESC
mean "only the latest event" will be persisted, and in case of losing network connectivity, this latest event will be sent in the next device's wake up occasion (by activity change, motion change, significant location change etc...)
Thanks will check out Config.geofenceModeHighAccuracy
maxRecordsToPersist
tells the plugin that the database must only contain that many records ever.
If you tell the plugin to hold only 1
record, after each INSERT INTO
, it's going to DELETE FROM
such that the database contains only 1 record (the most recent INSERT
)
with maxRecordsToPersist: 1
, Imagine your device currently has no network connection and enters 2 geofences A
and B
. After entering B
, A
is destroyed. The database contains only 1 record: the geofence B
.
Hi Chris,
We configure to use geofence with the plugin, does it mean maxRecordsToPersist only hold geofence event, or will it also hold heart-beat, location, activity and other stuff?
We want to use the ability to re-sync event when it failed, but we only want to re-sync geofence events. Is there a way to sync only geofence event with
url
andmaxRecordsToPersist
?Thanks,