Alternative to isSleepMode?

Former Member
Former Member
I'm looking for a way to detect when a user has gone to sleep so that I can then do something. I noticed the isSleepMode method is deprecated, is it being replaced with anything or are there other alternatives that I missed when looking through the docs that I can use to detect this? Thanks!
  • I'm looking for a way to detect when a user has gone to sleep so that I can then do something. I noticed the isSleepMode method is deprecated, is it being replaced with anything or are there other alternatives that I missed when looking through the docs that I can use to detect this? Thanks!


    isSleepMode is being phased out for the reason that Garmin is doing away with the manual toggle of sleep mode on devices.
    Some of the older models still allow you to manually toggle sleep mode on the device, but this has been absent on more recent models where Garmin has replaced it with server side sleep tracking combined with the sleep and wake hours defined in your user profile.

    Some developers like Jim (jim_m_58) has implemented his own sleep mode based on the user profile.

    On the newer devices there is also the do not disturb.

    So it is quite difficult to make sense of all these and know where to use what.
    I have spreadsheet / matrix with these details to make it easier to understand what can be used where.
  • Something you can't really do is base sleep on what the watch itself sees. Lack of movement could be that you're just sitting and watching TV, lying on the couch and reading, etc.

    Like Hermo said, isSleepMode really only was used on a couple of older watches with a manual sleep. Do not disturb is on some new ones. With DND, on some, it can be tied to your configured sleep time (you don't get buzzed and beeped for an email in the middle of the night), but you can manually turn that off and on (say you are in a meeting)

    The basics of I did was just do a sleep icon based on the times between a user's configured sleep time and wake time (you can get this info in CIQ is the UserProfile.) And if DND is available (2.x and above) I display that in a different way.
  • Former Member
    Former Member over 8 years ago
    private cedar

    I was trying to do some janky stuff (great way to start my idea lol) but I just wanted to have something happen when sleep mode was detected. (turn my tv off) cause why not. But it does not look possible. Thanks for the reply!