Earlier SDK documentation: This page preserves the separate alpha01 implementation and historical integration assessment. For current collection APIs, installation and samples, open the 0.1.0-alpha12 documentation. The
DtracRuntimeAPIs below are distinct from the currentDtracSdkAPIs.
The separate DTRAC Android SDK 0.1.0-alpha01 is an implemented internal Alpha for Kotlin Android hosts (minSdk 30). It exposes a shared runtime and feature clients for accelerometer data, Health Connect heart rate and steps, JSON survey workflows, and daily reminders. Local Maven packaging and an independent sample host exist; the Alpha is not published to an external package repository.
How does a host app use the SDK?
Read the diagram
The host creates DtracRuntime and passes it to SensorClient, HealthClient, SurveyClient and ReminderClient. Initialization alone does not collect data, request permissions or schedule alarms.
SensorClient streams accelerometer batches. HealthClient reads Health Connect heart-rate records and windows, and step aggregates. SurveyClient manages JSON definitions, run snapshots and submissions; the host renders the screen. ReminderClient provides daily schedules, up to one reminder, cancellation and explicit recovery.
Optional RoomStorage persists workflow definitions, runs, responses, schedules and consumer confirmations. Sensor and health measurements go to a host-owned DAO. Completed survey responses are confirmed only after the host callback returns; the host must save them idempotently by responseId.
The host owns consent, permission launch, foreground-service lifetime, notification setup, study policy and optional uploads. This diagram describes internal Alpha 0.1.0-alpha01, based on the separate SDK working tree reviewed on October 13, 2026. View implementation evidence (opens in a new tab).
Create a DtracRuntime and pass it to the clients needed by your app. The default runtime uses in-memory workflow state. Use RoomStorage for persistent reminders and completed-response recovery. Constructing the runtime does not start collection, launch permission requests or schedule alarms.
The SDK returns Kotlin data through Flow<T> streams and SdkResult<T> operations. The host renders survey screens, launches permission requests, manages foreground collection and notification setup, saves measurements, and supplies any server upload path. SDK workflow storage and the host measurement database are separate.
Current Alpha boundaries
- Collection: direct accelerometer only; Health Connect heart-rate records/windows and provider step aggregates. Other Engine sensor types and the Samsung Health adapter are outside this Alpha.
- Survey delivery: the SDK commits the completed response to workflow storage, then
deliverCompletedinvokes the host callback. Confirmation follows successful callback return. Redelivery is possible, so use an idempotent host upsert keyed byresponseId. - Reminders: daily schedules with up to one reminder, inexact Android alarms, explicit startup
recover()and explicit schedulecancel(). Closing the runtime does not cancel schedules. Study-end policy belongs to the host. - Packaging: six modules — core, sensor, health-connect, survey, reminders and storage-room. Feature modules use core; reminders also uses storage-room. No Engine UI, Firebase or Hilt dependency is required by the independent sample.
- Validation scope: the SDK checkout records earlier JVM, emulator, packaging and R8 checks. This documentation update reviewed source and the web preview; it did not repeat Android execution. Physical-device and long-running collection checks, external developer integration and public distribution remain open.
Historical integration assessment (September 2026)
The original assessment below concerns extracting reusable modules from the Engine app. It predates the separate SDK Alpha above and is retained as historical planning context.
Planned: A public unified SDK initialization API, distribution repository/version, and compatibility with an external host app have not been established as completed deliverables.
The September 17 presentation proposes a unified SDK for surveys, sensors, and health records. The repository's September 15 assessment identifies reusable modules, but does not conclude that copying three folders produces a distributable SDK.
Reusable foundations
| Area | Existing foundation | Remaining work |
|---|---|---|
| Surveys | JSON models/loader, Compose screens, submission contracts | Separate participant, timing, notification, audio and storage wiring for a host |
| Sensors | Collectors, foreground service, Room batch ingestion | Public configuration, start/stop and payload access; restart policy |
| Samsung Health | Reads, permissions, mapping and ingestion | Original SDK dependency delivery, app verification, read-range/failure contracts |
Database, repository, store, registry, theme, and shared-renderer dependencies are connected to these modules. They are not documented as one completed independent AAR.
Historical build assessment
The September 15 assessment reports successful Debug AAR generation for survey and sensor. For Samsung Health, it distinguishes a passed compilation stage from failed AAR packaging. These are historical assessment results, not builds repeated during documentation work.
External-host integration, release/R8, and long-running physical-device collection remain separate validation steps. Building the Android app and distributing a library are different checks.
Decisions for a partner integration
- Study/participant identifiers and configuration supplied by the host.
- Ownership of permission requests, foreground services, and notifications.
- Local-only versus server storage and audio-file retention.
- Result contracts separating empty data from errors, missing provider apps, and denied access.
- Explicit stop/reboot behavior and notification-ID collision avoidance.
- Original Samsung SDK dependency delivery and partner app registration.
Suggested validation sequence
A small Kotlin Android host can connect one survey, one sensor, and one health record type, then verify storage, retries, and process restart. This documentation does not implement that SDK or sample host. It does not supply unconfirmed Maven coordinates or initialization API examples.