Completed

:tools:

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.

27 votes

Tagged as Development

Created 14 August 2017 by Josh Sharp

Moved into Completed 20 December 2017

  • Sign in to comment. Sign in by email
  • 14 August 2017 Josh Sharp created this task

  • avatar

    Seems like an easy win, as any sleep app that syncs with Fit will work, and the platform already grabs steps from Fit - thanks!

    08 September 2017
  • avatar

    I want this very much!

    14 September 2017
  • avatar

    The more data you sync from Fit (and Health), the more trackers you support. I get sleep from Pebble, and maybe from a Huawei band - they both sync to Fit but don’t help ‘cause they’re not in Exist.

    17 September 2017
  • 20 September 2017 Josh Sharp moved this task into Under consideration

  • avatar

    Almost all trackers and many apps sync to Google Fit. Making support for Google Fit is an easy way to cover most of the Android market. Sleep tracking from Fit would be greatly appreciated :)

    22 September 2017
  • 06 October 2017 Josh Sharp moved this task into Planned

  • avatar

    Having a look again at what we get from Fit, and unfortunately both S Health Sync and Sleep as Android (still!) only send a ‘sleep’ record to Google Fit — no awakenings, no light or deep sleep breakdown. Not a lot I can do about this, but it makes the data somewhat less useful, which is a shame.

    06 October 2017
  • avatar

    Josh, I talked to the developers of S Health Sync, and they said sleep stages are being synced to Google Fit, but Fit cannot itself show sleep stages in it’s UI.

    Maybe you guys can talk together to figure out if there are any gaps?

    08 October 2017
  • avatar

    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!

    08 October 2017
  • avatar

    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.

    08 October 2017
  • avatar

    Ah, I see in a tooltip in Health Sync that only the S3 tracks and syncs sleep stages. I don’t have access to one of these and so won’t be able to test that.

    08 October 2017
  • avatar

    Hey Josh. I have an S3, so let me know if I can help you here in any way (testing, logs, etc).

    09 October 2017
  • avatar

    Oh great! If you’re already sending your sleep to Google Fit from there via Health Sync, I can use that to test. I’ll email you about it before I do anything :)

    09 October 2017
  • avatar

    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

    10 October 2017
  • avatar

    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

    11 October 2017
  • avatar

    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.

    01 December 2017
  • avatar

    Well, it’s good enough to have overall record. Better than nothing.

    06 December 2017
  • 09 December 2017 Josh Sharp moved this task into In progress

  • avatar

    I’m excited to see this in progress! It’s unfortunate that other services don’t seem to be storing the phases properly, but thanks for looking into it!

    10 December 2017
  • avatar

    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.

    10 December 2017
  • 20 December 2017 Josh Sharp moved this task into Completed

  • avatar

    This is awesome! It will make a lot of sense for me now since Mi fit band only send data to Google fit, so it’s the only way I can get my data in a good way. :)

    Thanks for integrating that.

    26 December 2017