Local files
Store JSON or zipped JSON on the device using
FileDataEndPoint.SQLite
Store measurements in a local SQLite database using
SQLiteDataEndPoint.Firebase
Upload files or JSON to Firebase via
carp_firebase_backend.CAWS
Stream and manage study data with CARP Web Services via
carp_backend.| Data manager/backend | Typical use |
|---|---|
| ConsoleDataManager | Debug output to the Dart console. |
| FileDataManager | Local file persistence as JSON (optionally zipped). |
| SQLiteDataManager | Local structured storage in SQLite. |
| FirebaseDataManager | Upload JSON/documents and files to Firebase services. |
| CarpDataManager | Stream and synchronize data with CAWS backend services. |
Files
TheFileDataEndPoint saves measurements in a JSON file on the local device. A FileDataEndPoint endpoint can be created and added to a study protocol, like this:
<local_application_path>/carp/deployments/<study_deployment_id>/data
where local_application_path is the folder where an application can place files that are private to the application. Data files follow the schema of carp-data-yyyy-mm-dd-hh-mm-ss-ms.json.
.zip is added, if the JSON file is zipped.
- Android
- iOS
On Android, Flutter files are stored in the
AppData directory, which is located in the
data/data/<<package_name>>/app_flutter folder. Files can be accessed via AndroidStudio.SQLite
This endpoint is very similar to the file endpoint, except that data is stored in an SQLite database instead of a file. This endpoint takes no configuration and can be added to a protocol like this:On Android, the SQLite db file is located in the
data/data/<<package_name>>/databases folder.Firebase
Thecarp_firebase_backend package is a separate Flutter package for supporting Google Firebase as a backend.
It supports uploading of data both as files in Storage as well as raw JSON in Firestore. Full documentation is provided as part of the plugin.
CARP web services
Thecarp_backend package is a separate Flutter package supporting the CARP Web Service (CAWS) backend. It supports:
- user authentication and setting up a connection to CAWS.
- download of a study deployment configuration from CAWS
- streaming of sensing data from CAMS to CAWS
- upload/download of data like files and JSON documents from/to CAWS
CarpDataEndpoint, like this: