Completed
Sleep from Google Fit
There are a few apps that sync sleep data into Google Fit, and as we already have this integration it makes more sense to get data from here than each individual app, provided the data is complete.
Hi Josh, thanks to Srijan I noticed what your wrote. Health Sync (partner app of Samsung Health) syncs health data between Google Fit and Samsung Health. When sleep data is synced from Samsung Health to Google Fit, and the sleep data in Samsung Health has sleep stage data included, then the sleep stages are synced to Google Fit. Google Fit has no user interface to show stages, but the stages are stored. I noticed when doing some tests that Sleep as Android doesn’t store stages to Google Fit, probably they thought that it doesn’t serve a purpose as long as Fit doesn’t show the stages. But the concept of Google Fit is that it can store all kind of Health Data, although it doesn’t show all data. Like sleep stages, more data can be stored in Fit without the possibility to show it in Fit: for example blood pressure, nutrition data and hydration data. If you need more information about Health Sync (https://play.google.com/store/apps/details?id=nl.appyhapps.healthsync&hl=en) or how sleep is synced to Fit, you can contact me at info@appyhapps.nl Good luck with Exist!
Hey anonymous Health Sync developer, thanks for the clarification. I’ve been getting the data directly out of the API, not using the UI. I tested it with my Samsung Gear S2, but noticed I only had a single sleep
record in Google Fit. Perhaps this was because it was a short test period rather than a true overnight sleep. I’ll give it another go and email if I still can’t see any light, deep, or REM periods in there.
Just a note that I sent a feature request to Sleep As Android support to request that they send the activity types: Light sleep (109), Deep sleep (110), REM sleep (111), Awake (during sleep cycle) (112) https://developers.google.com/fit/rest/v1/reference/activity-types
I initially emailed Sleep As Android support, not realizing they have a place for feature requests. I’ve now submitted it here: https://urbandroid.uservoice.com/forums/264867-sleep-as-android/suggestions/31843045-send-awakenings-and-sleep-phases-to-google-fit
Unfortunately from my testing (thanks Srijan) it seems that Health Sync doesn’t send sleep stages either. I tested if it was possible to save them successfully in Fit, in case it was an issue on the Google side, but sending my own dummy sleep stage records worked.
So for now I’m only going to support sleep records without breakdowns, as I don’t think anyone is sending any other data than that, although it definitely is possible.
This is wired up and ready to test if you have data. Just reconnect Google Fit and you should be able to set your sleep attributes to come from there. Send us an email if you run into any issues.