isSleepMode Attribute is not working When I start sleepMode in forerunner920xt

Former Member
Former Member
Hi Team,

I am using "isSleepMode" attribute that is present in ActivityMonitor.Info object to track the time when I start sleep mode and stop sleep mode in my forerunner 920xt device. After I stop sleep Mode, I display these values on widget, its not showing any value.
Please suggest how I can make this work.

Thanks.
  • Your widget has no way to know that the user entered or exited sleep mode; it won't be active when the user enters sleep mode, and even if it were, ConnectIQ doesn't send notifications for changes in device state.

    You can query the isSleepModeattribute but the only time your widget will be able to see the attribute is when it is set to false. This attribute is only really useful to watch faces since they are the only time ConnectIQ code can be running and have the device in sleep mode.

    Travis
  • Former Member
    Former Member over 10 years ago
    @ TRAVIS.VITEK

    Is there any other way to track sleep time through widget in forerunner 920xt or vivoactive. Like if watch can automatically track the sleep time via HR strap.
    Thanks.
  • No. The way the ConnectIQ environment works now, your app/widget can't track anything unless it is in the foreground. If you make a widget/app, and it is the active program, you can access the Sensor module for heart rate data, but I doubt you'd be able to tell if someone is asleep or not.

    If you want to display sleep statistics, your best bet is to add an enhancement request to get access to the data on the device or to write an application that accesses the sleep data from Garmin Connect.

    Travis
  • Former Member
    Former Member over 10 years ago
    Thanks Travis.

    Currently i am accessing the sleep data from garmin connect.