Skip to content
CARP Docs
Ask AISystemLightDark
On this page

Apple Watch Sensing

Collect passive sensor data from an Apple Watch in a CARP Mobile Sensing study.

Copy MarkdownOpen inOpen in GitHubView as MarkdownOpen in Scira AIOpen in ChatGPTOpen in ClaudeOpen in Cursor

carp_aware_package adds an Apple Watch as a data source to a CARP Mobile Sensing (CAMS) study. The watch collects motion, heart rate, location, sound and more while the participant wears it, including when the phone app is closed, and hands the data to the phone a few times an hour.

The package wraps the AWARE watchOS sensing framework by Yuuki Nishiyama (The University of Tokyo).

pub.devAPI referenceGitHub

iOS and watchOS only

The package supports iOS and watchOS only, and it needs a companion watchOS app inside your Flutter app's Xcode project. Without that app, the package has nothing to receive. You add it once, as described in The watch app.

Features

Buffered data transfer

The watch buffers data locally and transfers it every 15 minutes by default. Each record carries the timestamp set by the watch.

Background collection

The watch keeps collecting when it is out of range and when the phone app has been killed. iOS wakes your app in the background to receive the files.

Protocol configuration

Sampling rates and which sensors run are part of the study protocol. Deploying a new protocol from CARP Web Services reconfigures the watch.

No raw audio

Sound sensing produces a decibel value and a classification label. The recording is analyzed on the watch and discarded; no raw audio leaves the watch.

How it works

Architecture follows the full path from a sensor reading on the watch to a row in your data set.

Measure types

The package provides nine measure types in the dk.carp.watch.aware namespace:

Measure typeData classContents
dk.carp.watch.aware.motionAppleWatchMotionAcceleration, attitude, gravity, rotation rate, user acceleration
dk.carp.watch.aware.heartrateAppleWatchHeartRateHeart rate in BPM, read from HealthKit
dk.carp.watch.aware.batteryAppleWatchBatteryBattery level and charging state of the watch
dk.carp.watch.aware.locationAppleWatchLocationLatitude, longitude, altitude, speed, course
dk.carp.watch.aware.headingAppleWatchHeadingCompass heading and geomagnetic field
dk.carp.watch.aware.bluetoothAppleWatchBluetoothNearby Bluetooth devices seen by the watch
dk.carp.watch.aware.ambientnoiseAppleWatchAmbientNoiseNoise level in decibel
dk.carp.watch.aware.audiolabelAppleWatchAudioLabelSound classification labels (speech, laughter, …)
dk.carp.watch.aware.deviceAppleWatchDeviceInfoWatch model, watchOS version, and the phone it is paired with

Data types documents every field of every type.

Requirements

RequirementValue
PlatformsiOS and watchOS. Android is not supported.
iOS deployment target16.0
watchOS deployment target8.0
Flutter3.29 or newer (Swift Package Manager support)
Dart SDK3.8 or newer
TestingA physical iPhone with a paired Apple Watch

Test on real devices

The simulator cannot pair a watch to a phone in a way that makes WatchConnectivity file transfers work end to end, and heart rate needs real hardware.

Next steps

Installation

Add the dependency and prepare the iOS project.

Quickstart

Build a complete study protocol with an Apple Watch in it.

The watch app

Add the companion watchOS app. This step is required.

Configuration

Every setting on AppleWatchDevice, and what it costs.

Credits

The watchOS sensing framework wrapped by this package is com.awareframework.ios.sensor.applewatch by Yuuki Nishiyama (The University of Tokyo), available under the Apache License 2.0.

If this framework supports your research, please cite:

Y. Nishiyama and K. Sezaki, "Smartwatch-Based Sensing Framework for Continuous Data Collection: Design and Implementation", UbiComp/ISWC '23 Adjunct, pages 620–625, ACM, 2023.

Quick links

Page · DocumentationCARP DocumentationPage · DocumentationIntroductionPage · DocumentationQuickstartPage · DocumentationTerminologyPage · DocumentationArchitecture