Use this page to choose where CAMS stores or uploads collected measurements.

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/backendTypical use
ConsoleDataManagerDebug output to the Dart console.
FileDataManagerLocal file persistence as JSON (optionally zipped).
SQLiteDataManagerLocal structured storage in SQLite.
FirebaseDataManagerUpload JSON/documents and files to Firebase services.
CarpDataManagerStream and synchronize data with CAWS backend services.

Files

The FileDataEndPoint saves measurements in a JSON file on the local device. A FileDataEndPoint endpoint can be created and added to a study protocol, like this:
var protocol = SmartphoneStudyProtocol(
    ownerId: 'AB',
    name: 'Track patient movement',
    dataEndPoint: FileDataEndPoint(bufferSize: 500 * 1000, zip: true));
CARP measurements are stored in a subfolder called <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.
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:
var protocol = SmartphoneStudyProtocol(
    ownerId: 'AB',
    name: 'Track patient movement',
    dataEndPoint: SQLiteDataEndPoint());
The database files can be accessed like other files (see above).
On Android, the SQLite db file is located in the data/data/<<package_name>>/databases folder.

Firebase

The carp_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.
The Firebase data manager has not yet been updated to API level 2.x.

CARP web services

The carp_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
Full documentation is provided as part of the plugin, and an example of how this is used is part of the CAMS Demo App. The CAWS data endpoint can be added to a CAMS study protocol and further configured as a CarpDataEndpoint, like this:
// Add CAWS as the data endpoint using a stream (default)
protocol.dataEndPoint = CarpDataEndPoint(
    uploadMethod: CarpUploadMethod.stream,
    name: 'CARP Web Service (CAWS)',
    // Upload data every 10 min
    uploadInterval: 10,
    // Keep data on the phone even though it is uploaded
    deleteWhenUploaded: false,
);