Closed iDeliverDev closed 4 years ago
Should the locationTemplate affect what's getting stored in firebase or is it assumed that all processing will happen in Cloud Functions?
Here's how we are configuring (everything is working perfectly but the stored data is not in the structure we expected).
bg.Config config = bg.Config( desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH, distanceFilter: 3, logLevel: bg.Config.LOG_LEVEL_WARNING, locationTemplate: '{"lat":<%= latitude %>,"lng":<%= longitude %>,"ts":"<%= "timestamp" %>","id":<%= "uuid" %>,"acc":<%= accuracy %>}', extras:{"user-id":userId} ); await BackgroundGeolocationFirebase.configure(BackgroundGeolocationFirebaseConfig( locationsCollection: "/idriver/events/incoming", geofencesCollection: "geofences", updateSingleDocument: false, )); await bg.BackgroundGeolocation.ready(config);
Should the locationTemplate affect what's getting stored in firebase
No. When using Firebase Adapter, locationTemplate is ignored. You must use Firebase Cloud Functions to reformat the data as desired.
locationTemplate
Should the locationTemplate affect what's getting stored in firebase or is it assumed that all processing will happen in Cloud Functions?
Here's how we are configuring (everything is working perfectly but the stored data is not in the structure we expected).