Getting started

Permissions & background collection

Permissions and runtime conditions needed for collection.

Reviewed
On this page

Match permissions to collection

Check permissions against the study's selected items. A manifest declaration does not prove that a participant granted access or that records were collected.

PurposePermission or condition to check
LocationACCESS_FINE_LOCATION and location services
Network/call stateREAD_PHONE_STATE
Voice responsesRECORD_AUDIO
NotificationsNotification access for the Android version and channel settings
Precise schedulingExact-alarm availability and related settings
Sensor foreground service`health
Samsung HealthData read access granted through Samsung Health
Health ConnectPer-record read access and feature availability

Bluetooth and Wi-Fi code use additional permissions, but neither is in the baseline sensor list. Check them separately if enabled by a study.

Background behavior

Sensors use a foreground service and startup/restart paths. Several collectors start with a 60,000ms window. This is not a system guarantee of one-minute execution in every condition. Android applies restrictions to starting foreground services from the background.

Test the research device with the screen off, the app in the background, and after a reboot. Resumption after force-stop or manufacturer battery management requires device-specific validation.

When records are missing

  1. Check whether the collection item is in the study configuration and allowlist.
  2. Check revoked permissions and disabled location services.
  3. Confirm that health records exist in Samsung Health or Health Connect first.
  4. Check whether a sensor batch has sampleCount zero and whether its payload contains a measurement.
  5. Separate local collection failures from server synchronization failures.

Participant information

The study team should explain what is collected and why, storage destinations, how to stop participation, and how to contact the team. This documentation describes implementation behavior; it does not replace a study consent document or privacy policy.

Documentation evidence

Working-tree baseline · source paths · HEAD 8213e6b7

  • app/src/main/AndroidManifest.xml
  • plugins/sensor/src/main/AndroidManifest.xml
  • plugins/sensor/src/main/java/com/hdil/datacollection/plugins/sensor/SensorPermissionHelper.kt
  • plugins/sensor/src/main/java/com/hdil/datacollection/plugins/sensor/foreground/SensorForegroundService.kt
  • plugins/sensor/src/main/java/com/hdil/datacollection/plugins/sensor/auto/SensorAutoCollectorStarter.kt

References

DTRAC AndroidYonsei University · Bongshin Lee’s research team