Three representations
A plugin Event is a common read contract. Room entities and remote upload documents are separate structures. One Event is not a complete export format for every data type.
| Representation | Key fields | Interpretation |
|---|---|---|
Event | type, startMs, endMs, valueNum, unit, source | valueNum is Kotlin Any, so may contain a number or object |
| Sensor batch | sensorType, startedAt, endedAt, sampleCount, payloadJson | Summary event differs from measurement payload |
| Health metric | metric, startAt, valueNum/valueStr/valueJson, unit, sourcePackage | Read the value representation and unit together |
| Health session | type, startAt, endAt, metaJson, owner | Interval records such as sleep and exercise |
| Survey response | surveyId, bundleJson, dedupeKey, revision, syncState | Interpret with occurrence and question structure |
| External metric | Metric name, time, polymorphic value | Check the game-specific summary |
Sensor Event example
This is an illustrative JSON representation of a batch summary, not a public HTTP API response.
{
"type": "accelerometer",
"startMs": 1789603200000,
"endMs": 1789603260000,
"valueNum": 40,
"unit": "samples",
"source": "sensor"
}
The value 40 is a sample count, not acceleration. Mean acceleration values are in the associated batch payload.
Time and units
Epoch timestamps generally use milliseconds. Audio durationMs and call payload callDuration are also milliseconds, while Health Connect's ingested exercise_duration uses seconds. Similar names do not establish equal units.
Health dayKey and survey occurrences depend on local-date/timezone rules. Interpret zoneOffsetMin, source timestamps, and session boundaries together. Specify the study timezone when converting UTC epoch values to displayed dates.
Samsung paths store heart rate in bpm, pressure in mmHg, and oxygen saturation in %. Compare conversion logic and stored units before combining similarly named metrics from different providers.
Data-quality interpretation
Batch existence, sample count, valid measurements, and successful upload are different criteria. A zero count is not always an observed zero measurement. A remote sensor document marked payloadOmitted may exist without its full payload.
Do not assign ownerless legacy data or another participant's data to the current participant. Extraction should follow the actual storage and sync implementations.