Repository navigation
Explain what Samsung Health+ needs to sync: its own consent and background starts - #46
Merged
Merged
Conversation
Samsung keeps the health data consents per app, so Samsung Health+ does not
inherit the ones given in the stock app. With the health and wellness
consent off, its server sync stops at once for every category ('Withdrawn
to shd': SyncStatusProvider.isAllShdWithdrawn, whose per-category default is
'withdrawn' outside China), Settings > Sync with Samsung account shows 'No
sync history' and the home banner only blames the network. Seen on a Xiaomi
12: after turning the consent on, the first sync downloaded the full
history (steps, sleep stages, heart rate, HRV, SpO2, ...).
Adds the step to the Samsung Health+ section and a note to the LibreStatic#9 entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
The cloud path is not slow by itself: the stock app uploads within minutes and the server pushes a sync request to Samsung Health+ (sync_type=PUSH with the changed manifests), which downloads the new rows. Measured on a Xiaomi 12 with a Galaxy Watch7: steps uploaded at 14:36:15, push at 14:37:18, 7 new step_count rows in Samsung Health+ at 14:37:21. Both hops need background starts, which HyperOS blocks by default (autostart) and turns off again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Thank you @Frossic! Merged into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Samsung Health+ never synced with the Samsung cloud on my setup (Xiaomi 12, Galaxy Watch7). The cause is not the cloud round trip of #9 but a consent: Samsung keeps the health data consents per app, so Samsung Health+ does not inherit the ones given in the stock Samsung Health. With them off, every sync is skipped on purpose.
This PR only documents it: a step in the Samsung Health+ section and a Note under the #9 known issue. No code changes.
What I saw
<prefix>.shealth:remoteon every sync attempt:getLastSync minUpload: 1969(never synced).Why it blocks the sync
From the 7.2.0.041 code:
SyncHelper.performSyncstops withWithdrawn to shdwhenSyncStatusProvider.isAllShdWithdrawn()is true (and the request is not a forced download). That is true when everyShdCategory(HealthWellness, Cycle, Medication) readspref_is_withdrawn_to_shd_<category>as true, and the default of that preference is true outside China. Accepting the health and wellness consent goes throughsetAgree→ServerSyncControl.setWithdrawnToShd(HealthWellness, false).Verified
After turning on Consent to the processing of health and wellness data in Samsung Health+ and tapping Sync, the first sync downloaded the whole history (≈9.5k step records, 4.1k sleep stages, 4k heart rate, plus HRV, SpO2, respiratory rate, calories) and the settings show the last sync time.
I deliberately did not patch the check out: it would make the app process sensitive health data without the user's consent.
Update: the cloud round trip itself is fast
Once the consent is on and the apps may start in the background, new watch data reaches Samsung Health+ in about a minute. The stock app uploads within minutes (
upload=trueLOCAL syncs), and the server then pushes a sync request to Samsung Health+ (sync_type=PUSH,down_sync_only=true, with the changed manifests):manifest_list=…pedometer_step_count,…step_count)step_countrowsOn Xiaomi phones both hops were blocked by HyperOS: background autostart is off by default for these apps and gets turned off again, so the stock app neither uploaded nor reacted, and Samsung Health+ missed the pushes. The second commit adds that to the Samsung Health+ section (with the HyperOS setting names) and points to it from the #9 note.
🤖 Generated with Claude Code