In progress

: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.

30 votes

Tagged as Development

Created 14 August by Josh Sharp

Moved into In progress Saturday

  • Sign in to comment and vote. Sign in with Google
  • avatar
    Tristram Oaten

    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
  • avatar
    Igor Polyakov

    I want this very much!

    14 September
  • avatar
    Seth Sternberg

    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
  • avatar
    Mohsan Alvi

    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
  • avatar
    Josh Sharp

    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
  • avatar
    Srijan Choudhary

    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
  • avatar
    appyhapps.nl

    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
  • avatar
    Josh Sharp

    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
  • avatar
    Josh Sharp

    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
  • avatar
    Srijan Choudhary

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

    09 October
  • avatar
    Josh Sharp

    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
  • avatar
    Simon Mckenzie-Nickson

    Josh, I too have an S3. Using health sync to send data to fit. Let me know if I can help.

    09 October
  • avatar
    Stephen Klancher

    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
  • avatar
    Stephen Klancher

    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
  • avatar
    Josh Sharp

    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
  • avatar
    Pavel Egorkin

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

    06 December
  • avatar
    Stephen Klancher

    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!

    Sunday
  • avatar
    Josh Sharp

    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.

    Sunday