The CARP Mobile Sensing Framework

The CARP Mobile Sensing Framework – CAMS for short – is a programming framework for adding digital phenotyping capabilities to your mobile (health) app [1]. CAMS is designed to support two things:

  1. collection of sensor data from the smartphone on-board sensors and attached off-board wearable devices, and
  2. triggering of “user tasks” such as a survey or a cognitive test.

Background and Motivation

It all started a sunny afternoon at the 9th International UBI Summer School 2018 (UBISS 2018) where Denzil Ferreira and I talked about the opportunity for creating a new cross-platform sensing framework using the novel Google software framework of Flutter, which at that time was available in an early beta release. This could be a next generation sensing framework building on the experience from the AWARE Framework.

Instead of AWARE which is (mainly) an app for mobile sensing, the goal was to first-and-foremost to create a programming framework for software developers to use in the design of their mobile sensing and/or mobile health apps. Hence, focus was on providing a set of software components and programmer APIs which would allow the programmer to easily add the core mobile sensing features to an app and support the collection, processing, storing, and off-loading of sensing data.

Moreover, the framework should (i) be cross-platform (Android / iOS), (ii) apply a reactive programming model, (iii) unify sensing across different sensors and devices, (iv) allow for flexible data management, and – most importantly – (v) be extensible [2].

There are much more details on these software architecture qualities on the CARP Mobile Sensing homepage and in the different publications on CAMS.

CAMS have been used to create a number of applications, e.g., for cardiology [3], mental health [4], and diabetes.

CAMS and all of its packages are open source and available from Github. It has been developed over a series of major releases and is constantly being updated – both in order to add new features (like new triggers) and to keep up with the ever-changing releases of the iOS and Android operating systems.

The Dart API doc describes the different libraries and classes.

The wiki contains detailed documentation on the CARP Mobile Sensing Framework, including the domain model, how to use it by create a Study configuration, how to extend it, and an overview of the different Measure types available.

A more scientific documentation of CAMS is available at arxiv.org [1]:

References

[1] [pdf] J. E. Bardram, “The CARP Mobile Sensing Framework–A Cross-platform, Reactive, Programming Framework and Runtime Environment for Digital Phenotyping,” arXiv preprint arXiv:2006.11904, 2020.
[Bibtex]
@article{bardram2020carp,
title={The CARP Mobile Sensing Framework--A Cross-platform, Reactive, Programming Framework and Runtime Environment for Digital Phenotyping},
author={Bardram, Jakob E},
journal={arXiv preprint arXiv:2006.11904},
arxivId = {cs.HC/2006.11904},
year={2020}
}
[2] [pdf] [doi] J. E. Bardram, “Software Architecture Patterns for Extending Sensing Capabilities and Data Formatting in Mobile Sensing,” Sensors, vol. 22, iss. 7, p. 2813, 2022.
[Bibtex]
@article{bardram2022software,
title={Software Architecture Patterns for Extending Sensing Capabilities and Data Formatting in Mobile Sensing},
author={Bardram, Jakob E},
journal={Sensors},
volume={22},
number={7},
pages={2813},
year={2022},
doi={https://doi.org/10.3390/s22072813},
publisher={MDPI}
}
[3] [pdf] [doi] D. Kumar, R. Maharjan, A. Maxhuni, H. Dominguez, A. Frølich, and J. E. Bardram, “mCardia: A Context-Aware ECG Collection System for Ambulatory Arrhythmia Screening,” ACM Transactions on Computing for Healthcare (HEALTH), vol. 3, iss. 2, p. 1–28, 2022.
[Bibtex]
@article{kumar2022mcardia,
title={mCardia: A Context-Aware ECG Collection System for Ambulatory Arrhythmia Screening},
author={Kumar, Devender and Maharjan, Raju and Maxhuni, Alban and Dominguez, Helena and Frølich, Anne and Bardram, Jakob E},
journal={ACM Transactions on Computing for Healthcare (HEALTH)},
volume={3},
number={2},
pages={1--28},
year={2022},
doi={https://doi.org/10.1145/3494581},
publisher={ACM New York, NY}
}
[4] [pdf] D. A. Rohani, A. Q. Lopategui, N. Tuxen, M. Faurholt-Jepsen, L. V. Kessing, and J. E. Bardram, “MUBS: A Personalized Recommender System for Behavioral Activation in Mental Health,” in Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems, 2020, p. 1–13.
[Bibtex]
@inproceedings{rohani2020mubs,
author = {Rohani, Darius A and Lopategui, Andrea Quemada and Tuxen, Nanna and Faurholt-Jepsen, Maria and Kessing, Lars V and Bardram, Jakob E},
booktitle = {Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems},
file = {:Users/bardram/Documents/Mendeley Desktop/3313831.3376879.pdf:pdf},
pages = {1--13},
title = {{MUBS: A Personalized Recommender System for Behavioral Activation in Mental Health}},
year = {2020}
}