Sensors & health data

Smartphone sensors

Understand the six baseline collection types and their stored values.

Reviewed
On this page

Baseline collection types

The registry selects the following six types. Execution still depends on selected types, available hardware, permissions, and foreground-service state.

TypeMeaningStored content and interpretation
accelerometerPhone accelerationMean X/Y/Z over a burst, sample count, window/burst duration
device_motionRotation, magnetic field, gravity, orientationPer-sensor counts and summaries, last rotation vector
screen_stateDevice screen and lock stateState snapshot, screen events, battery percentage/status
gpsLocationLast location's latitude, longitude, accuracy and related fields
telephonyNetwork-state updatesSignal-update count and listener registration state
telephony_callCall-state changesInferred call state, start/end timestamps and duration

Acceleration is not stored as a continuous raw waveform. signalUpdateCount is not signal strength itself. screen_state is neither research-app dwell time nor another app's usage history.

Timing and missing data

Collectors start with 60,000ms windows, but sampling and batch creation differ by type. Acceleration is summarized from a burst. Call collection skips batch creation when no completed call events exist. Do not expect one row per minute for every type.

Some types write a zero-count status batch even when no measurement is available. A row's existence does not establish valid sensor data. Location may be the last known value; inspect its timestamp and accuracy.

Example acceleration payload

These are fictional illustrative values, not participant data.

CODE
{
  "sensor": "accelerometer",
  "windowMs": 60000,
  "burstDurationMs": 1000,
  "windowDurationMs": 60000,
  "sampleCount": 40,
  "avg": { "x": 0.12, "y": 9.72, "z": 0.35 }
}

Android acceleration values use m/s². SensorPlugin.pull() returns the batch's sampleCount as Event.valueNum with unit="samples", not the payload above. Inspect the Room batch payload for analysis.

Permissions and storage

Location needs location access and system location services; network and call-state listeners need phone-state access. Records are stored in sensor_sample_batches, including payloadJson, and use the sensor sync path. See permissions and data formats.

Non-default and planned items

Collection code exists for wifi and nearby_device, but neither is in the six-type baseline registry. Research-app usage-time instrumentation is presented as future work in the meeting slides. Type declarations and old README examples do not expand default support.

Documentation evidence

Working-tree baseline · source paths · HEAD 8213e6b7

  • app/src/main/assets/manifests/plugins/registry.json
  • plugins/sensor/src/main/java/com/hdil/datacollection/plugins/sensor/auto/SensorAutoCollectorStarter.kt
  • plugins/sensor/src/main/java/com/hdil/datacollection/plugins/sensor/SensorPlugin.kt
  • plugins/sensor/src/main/java/com/hdil/datacollection/plugins/sensor/ingest/SensorIngestionService.kt
  • core/db/src/main/java/com/hdil/datacollection/db/entity/sensor/SensorEntities.kt
DTRAC AndroidYonsei University · Bongshin Lee’s research team