carp_mobile_sensing
3.0.1, released 3 days ago by carp.dk
Mobile sensing framework for collecting sensor and device data via configurable probes.
What it does
A software framework for collecting sensor and device data from phones and wearables using probes, triggers, and tasks. It handles scheduling, local SQLite storage, and background sampling across multiple platforms.
AI-written summary of version 3.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to build a digital phenotyping or mHealth app requiring continuous background sensor data collection.
- You want to collect step counts, ambient light, screen events, and battery status locally or via a study protocol.
Skip it when
- You only need a simple, single sensor check without a full protocol-driven management framework.
- You are targeting platforms other than Android and iOS.
Strengths
- Cross-platform support for iOS and Android.
- Extensible architecture supporting custom triggers, probes, and data endpoints.
- Built-in local SQLite storage and background task handling.
Weaknesses
- Requires careful platform-specific configuration for background execution and notifications.
- Complex setup for custom study protocols and multi-device coordination.
Setup
- Kind
- Flutter widgets
- Effort
- High
- Code generation
- Yes (build_runner)
- Direct dependencies
- 23
Requires configuring flutter_local_notifications for Android/iOS and flutter_background for Android along with appropriate permissions in AndroidManifest.xml and Info.plist.
SmartPhoneClientManager().configure().then((_) => SmartPhoneClientManager().addStudyFromProtocol(SmartphoneStudyProtocol.local(name: 'Tracking', measures: [Measure(type: SensorSamplingPackage.STEP_EVENT)])).then((study) => SmartPhoneClientManager().tryDeployment(study.studyDeploymentId, study.deviceRoleName).then((_) => SmartPhoneClientManager().resume())));Alternatives
Packages that do the same job and could replace carp_mobile_sensing.
- app_settings
Open iOS and Android phone settings pages from a Flutter app.
89Compare - native_device_orientation
A Flutter plugin for reading native device orientation from UI or sensors.
79Compare - watch_connectivity
Wrapper for WatchConnectivity on iOS and Wearable APIs on Android.
85Compare - health_connector_hc_android
Android implementation of the health_connector plugin using Health Connect SDK.
75Compare
Works with
Packages commonly used together with carp_mobile_sensing: ones it builds on, ones built on it, and its own family.
- archivecarp_mobile_sensing depends on itEncodes and decodes archive and compression formats such as zip, tar, gzip, and zlib.
- asynccarp_mobile_sensing depends on itUtility classes and helpers that extend Dart's async library.
- json_annotationcarp_mobile_sensing depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- path_providercarp_mobile_sensing depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- shared_preferencescarp_mobile_sensing depends on itFlutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android.
- package_info_pluscarp_mobile_sensing depends on itFlutter plugin to query app package info like version, build number and installer store.
- timezonecarp_mobile_sensing depends on itTime zone databases and time zone aware DateTime class in Dart.
- device_info_pluscarp_mobile_sensing depends on itProvides detailed information about the current device, make, model, and OS version.