Configuring Sensor Data
Configure smartphone sensors to collect background data that complements your surveys.
The Sensor Data tab in the study edit page allows researchers to configure smartphone sensors that collect data in the background, independent of survey responses. This passive data collection is a powerful feature of the SMAAT platform, enabling you to gather contextual information about participants’ environments, movements, and behaviors without requiring their active input.
Background sensors run continuously (or at specified intervals) while the SMAAT app is active, providing a continuous stream of data that can be correlated with survey responses or analyzed independently. The platform supports fine-grained control over sensor settings to balance data quality and battery efficiency.
Available Sensors
Currently, the SMAAT platform supports the following sensors for background data collection:
- GPS: Tracks the participant’s geographic location using latitude and longitude coordinates, ideal for studies on mobility, environmental exposure, or location-based behaviors.
- Health Data: Passively reads health metrics (steps, resting heart rate, and sleep) from the device’s health platform — Apple Health on iOS and Health Connect on Android — ideal for studies on physical activity, sleep, and physiological correlates of behavior.
Configuring GPS Sensor
To enable GPS data collection, activate the GPS sensor in the Sensor Data tab and configure its settings to suit your study’s needs.
Sampling Rate
Choose from predefined sampling rates to balance data granularity and battery usage:
- Low: Battery-saving mode, collecting data less frequently (e.g., every 5 minutes).
- Medium: Balanced mode, suitable for most studies (e.g., every 1 minute).
- High: High-frequency mode for maximum data quality (e.g., every 10 seconds), but more battery-intensive.
- Custom: Manually configure settings for precise control.
Custom GPS Options
If you select the custom sampling rate, you can fine-tune the following parameters:
- Activity Type (iOS only): Specify the participant’s activity to optimize location accuracy (e.g., “Other Navigation” for general movement, “Fitness” for exercise tracking).
- Deferred Updates:
- Distance: The minimum distance (in meters) the device must move before triggering a location update (e.g., 100 meters).
- Interval: The time interval (in milliseconds) between location updates (e.g., 60000 for 1 minute).
- Timeout: The maximum time (in milliseconds) to wait for a location update before stopping the service (e.g., 300000 for 5 minutes).
- Foreground Service:
- Notification Title: The title displayed in the notification when the service is active (e.g., “SMAAT Location Tracking”).
- Notification Body: The body text of the notification (e.g., “Collecting location data for your study.”).
- Notification Color: The color of the notification icon, enhancing visibility.
- Kill on Destroy: Option to stop the service if the app is closed, preserving battery life.
- iOS-Specific Options:
- Pauses Updates Automatically: Pauses location updates in low-signal areas (e.g., tunnels) to improve accuracy.
- Shows Background Location Indicator: Displays a blue bar on the iOS device when location services are active in the background.

Configuring Health Data Sensor
The Health Data sensor passively collects health metrics from the device’s health platform once per day in the background. On iOS it reads from Apple Health; on Android from Health Connect. To enable it, turn on the Health Data toggle in the Sensor Data tab and select which data types to collect.
Data Types
Choose one or more of the following data types. At least one must be selected for the sensor to collect anything:
- Steps: Daily step count aggregated per calendar day. Reported as a value with the unit
countand a start/end date for each day (e.g.,8342steps). - Resting Heart Rate: Individual resting heart-rate measurements in beats per minute. Each sample includes its value (unit
bpm, e.g.,62) and the timestamp it was recorded. - Sleep: Sleep stage segments —
light,deep,rem, andawake— each with a start time, end time, and duration in minutes.
How Collection Works
- Frequency: Health data is read once per day in the background, so it has minimal battery impact compared to continuous sensors like GPS.
- Source platform: SMAAT reads whatever data is already present in Apple Health or Health Connect — it does not measure metrics directly. Data quality therefore depends on the participant’s own devices (phone, smartwatch, fitness tracker) feeding those platforms.
- Export: Collected values appear in your study data export as separate
steps,restingHeartRate, andsleepcolumns.
Next Steps
With your sensor data collection configured, explore the following sections to continue building and managing your research on the SMAAT platform: