DTRAC SDK Alpha integration and data ownershipA host Android app creates DtracRuntime and feature clients. SensorClient reads accelerometer batches; HealthClient reads Health Connect heart rate and steps. SurveyClient manages JSON definitions and survey runs rendered by the host. ReminderClient schedules inexact Android alarms. Optional SDK RoomStorage persists workflow state. The host owns permissions, foreground collection, measurement storage, idempotent response delivery and any server upload. 01 Host Android app 02 SDK runtime & feature APIs 03 Platform & UI Initialize explicitly DtracRuntime( context, RoomStorage("workflow.db") ) Choose the modules your app needs. Host responsibilities UI & consent Render surveys; launch permission UI. Collection lifetime Start/stop coroutines and a host FGS. Notifications Create channels, icon and destination. Study policy Identity, study end, retention & upload. App startup Call recover() after channel setup. Runtime close ≠ schedule cancellation. DtracRuntime :sdk:core MemoryStorage by default · optional persistent RoomStorage Create feature clients with this runtime. Initialization does not start collection, request permission or schedule alarms. create SensorClient :sdk:sensor collect(AccelerometerConfig) → Flow<SensorBatch> Direct accelerometer · RAW / SUMMARY / BOTH · cancellation stops collection HealthClient :sdk:health-connect records(HeartRate, …) · heartRate(…) · aggregate(Steps, …) Heart-rate pages / windows and provider step aggregates · no automatic retry SurveyClient :sdk:survey registerJson → createRun → getRun / begin → submit Definition snapshots · scale / singleChoice / text · host renders the survey ReminderClient :sdk:reminders scheduleSurvey · updateSchedule · cancel · recover Daily schedule + up to one reminder · requires persistent workflow storage Return contract: SdkResult<T> for one-off work · Flow<T> for streams calls Android SensorManager Accelerometer events Device availability required Health Connect Heart rate + steps, read-only Host launches the permission contract Host survey screen Render the run snapshot Return answers through submit() Android alarms Receivers → host Activity Inexact timing; recovery is explicit events read Host handles availability & denied access. 04 Storage & delivery Survey + reminders Sensor / health results SDK workflow :sdk:storage-room RoomStorage: definitions, runs, responses, schedules and consumer confirmations. Workflow state only; no sensor / health values. Host measurement DB Sensor / health results → host DAO Survey responses → idempotent upsert Deduplicate by responseId. Host chooses schema, retention and errors. deliverCompleted commit → confirm Redelivery is possible. Host backend optional Host supplies authentication, upload, retries and network policy. No built-in SDK server synchronization. host-owned upload 0.1.0-alpha01 · Kotlin Android · minSdk 30 · Local artifacts; no public package release. Integration view, not a complete dependency graph. Physical-device and long-running collection validation remain open.
DTRAC SDK Alpha architecture
Implementation evidence

Source review: October 13, 2026. Independent SDK Alpha working tree, branch codex/dtrac-sdk-alpha, base 8611308c30781f89589efd6b66857c7e61ebbfd4 plus local SDK implementation. These paths refer to that SDK checkout, not the Engine application checkout. No new Android execution is claimed by this documentation update.

Six modules: core, sensor, health-connect, survey, reminders and storage-room. Public distribution, physical-device and long-running validation remain open. Samsung Health, other device sensors, Engine UI, iOS and SDK-owned server sync are not included in this Alpha.

  • sdk/core/src/main/java/com/hdil/dtrac/core/DtracRuntime.kt — Shared runtime, workflow selection, resource cancellation; construction starts no collection.
  • sdk/sensor/src/main/java/com/hdil/dtrac/sensor/SensorClient.kt — Sensor.TYPE_ACCELEROMETER, batch Flow and cancellation cleanup.
  • sdk/health-connect/src/main/java/com/hdil/dtrac/health_connect/HealthClient.kt — Heart-rate records/windows and provider step aggregation; availability and permission checks.
  • sdk/health-connect/src/main/java/com/hdil/dtrac/health_connect/HealthProvider.kt — Android adapter and host-launched permission contract for HeartRate and Steps.
  • sdk/survey/src/main/java/com/hdil/dtrac/survey/SurveyClient.kt — Definition, run, submission and completed-response delivery API.
  • sdk/survey/src/main/java/com/hdil/dtrac/survey/SurveyEngine.kt — Transactional completion; host callback returns before consumer confirmation.
  • sdk/reminders/src/main/java/com/hdil/dtrac/reminders/ReminderClient.kt — Explicit scheduling, update, cancellation and startup recovery.
  • sdk/reminders/src/main/java/com/hdil/dtrac/reminders/AndroidAlarmDriver.kt — Inexact AlarmManager scheduling and host notification requirements.
  • sdk/storage-room/src/main/java/com/hdil/dtrac/storage_room/RoomStorage.kt — Persistent workflow snapshot, separate from host measurements.
  • samples/sdk-android/app/src/main/java/com/hdil/dtrac/sample/SampleApplication.kt — Independent sample creates workflow runtime and its own measurement database.
  • samples/sdk-android/app/src/main/java/com/hdil/dtrac/sample/CaptureService.kt — Host-owned foreground capture, lifetime, visible stop and DAO writes.
  • sdk/README.md — Alpha scope, six modules, local artifacts and unverified runtime limits.