We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have flutter_background_geolocation + background_geolocation_firebase correctly working (Android) with locations: My setup looks like this:
BackgroundGeolocationFirebase.configure(BackgroundGeolocationFirebaseConfig( locationsCollection: "/vehicles/${_vehicle.id}/locations", geofencesCollection: "/routes/${_currentRoute.id}/geofences", updateSingleDocument: false ));
Locations are working as expected creating a subcollection inside current vehicle document.
Now I am trying to add geofences, adding multiple geofences at once (2 for this example: id: 1, id: 21) to a list:
List<bg.Geofence> geofences = new List<bg.Geofence>(); // foreach step in steps Bg.Geofence geofence = bg.Geofence( identifier: step.index.toString(), radius: 200, latitude: step.latitude, longitude: step.longitude, notifyOnEntry: false, notifyOnExit: false, notifyOnDwell: true, loiteringDelay: 30000, // 30 seconds extras: {"type": step.type}); geofences.add(geofence); // end foreach if (geofences.isNotEmpty) bg.BackgroundGeolocation.addGeofences(geofences);
But nothing happens, subcollection is never created and these logs are shown:
I/TSLocationManager( 5389): [c.t.l.data.sqlite.GeofenceDAO destroy] I/TSLocationManager( 5389): ✅ 1 I/TSLocationManager( 5389): [c.t.l.data.sqlite.GeofenceDAO create] I/TSLocationManager( 5389): ✅ 1 I/TSLocationManager( 5389): [c.t.l.data.sqlite.GeofenceDAO destroy] I/TSLocationManager( 5389): ✅ 21 I/TSLocationManager( 5389): [c.t.l.data.sqlite.GeofenceDAO create] I/TSLocationManager( 5389): ✅ 21 D/TSLocationManager( 5389): [c.t.l.g.TSGeofenceManager c] ℹ️ Persist monitored geofences: []
Why are there sqlite references if I am using the firebase version?
The text was updated successfully, but these errors were encountered:
Those logs are normal.
Because the plugin stores ADDED geofences in its SQLite database. This is the collection of geofences you've asked the plugin to monitor.
I think you're confused about added geofences vs geofence events.
When a geofence EXIT / ENTER event occurs, then the plugin will post that event to Firebase.
EXIT
ENTER
Sorry, something went wrong.
No branches or pull requests
I have flutter_background_geolocation + background_geolocation_firebase correctly working (Android) with locations:
My setup looks like this:
Locations are working as expected creating a subcollection inside current vehicle document.
Now I am trying to add geofences, adding multiple geofences at once (2 for this example: id: 1, id: 21) to a list:
But nothing happens, subcollection is never created and these logs are shown:
I/TSLocationManager( 5389): [c.t.l.data.sqlite.GeofenceDAO destroy]
I/TSLocationManager( 5389): ✅ 1
I/TSLocationManager( 5389): [c.t.l.data.sqlite.GeofenceDAO create]
I/TSLocationManager( 5389): ✅ 1
I/TSLocationManager( 5389): [c.t.l.data.sqlite.GeofenceDAO destroy]
I/TSLocationManager( 5389): ✅ 21
I/TSLocationManager( 5389): [c.t.l.data.sqlite.GeofenceDAO create]
I/TSLocationManager( 5389): ✅ 21
D/TSLocationManager( 5389): [c.t.l.g.TSGeofenceManager c] ℹ️ Persist monitored geofences: []
Why are there sqlite references if I am using the firebase version?
The text was updated successfully, but these errors were encountered: