Syncing data with Health Connect
summary
Health Connect syncs bidirectionally by writing records with InsertRecords while setting clientRecordID and clientRecordVersion so the platform deduplicates and resolves updates; large uploads batch ~1,000 records and use WorkManager with retries. Consume changes via the Changes Sync API by calling getChangesToken, storing per-data-type tokens, filtering out your own package’s writes, and handling token expiry after 30 days plus the restriction that reads only work when the app is foregrounded.
AI-written summary · about
chapters (4)
related talks
18mIntroducing new APIs for health and fitness in Health Connect by Android
14mCreating helpful fitness experiences with Health Services and Health Connect
23mHow to Build a Healthcare App in 2022
24mDon't be afraid to handle network loss in your code
53mNo Signal, No Problem: How We Collect Data in the Most Remote Places
39mHealth Ecosystem — Opportunities Explored Together
38m"Offline" is not an error
39mIndemnity in the Data Layer
