Firebase Backend
| Package | carp_firebase_backend |
| Code | backends/carp_firebase_backend |
A Flutter plugin for uploading data from the CARP Mobile Sensing Framework to a Google Firebase data backend.
Supports uploading json to Firebase as either (zipped) files to Firebase Storage or as plain json to a Firebase Database.
This package can upload sending data to Goggle Firebase in two ways:
-
Google Firebase Storage – By using the Google Firebase Storage endpoint, CARP sensing data are uploaded as raw or zipped JSON file, generated using the
FileDataManagerincarp_mobile_sensing. In Firebase, files with sensed data is stored in thepathspecified in theFirebaseStorageDataEndPointplus subfolders for each study and device. The path on Firebase hence follow this pattern:/<path>/<study_id>/<device_id>/ -
Google Firebase Database – By using the Google Firebase Database endpoint, CARP sensing data are uploaded as raw JSON data points, using Firebase as a
DataManagerincarp_mobile_sensing. In Firebase, data json objects are stores in thecollectionspecified in theFirebaseDatabaseDataManager. JSON objects will be stored in collections named/<collection>/<study_id>/<device_id>/upload/<data_type>relative to this path. For example, ifcollectioniscarp_data,study_idis1234anddevice_idisR16NW, location data will be stored as documents in this collection:carp_data/1234/R16NW/upload/location.