Watchface with Seconds

Is it possible to create a watchface that contains seconds. According to the programmers guide, onUpdate is only called once every minute for watchfaces and its not possible to create a timer in a watchface.
  • Found that in the "Connect IQ User Experience Guide.pdf" file (SDK 0.2.4) :

    "Watch faces update at once a minute in low power mode, or once a second when in full power mode. The watch will transition out of low power mode when the user gestures to look at it. A watch face can detect if it is in low power mode or not by getting the system stats from Toybox.System."

    Isn't it true for the moment ?


    I just had a chance to test this out.

    It seems that in Preview 2, watch faces still only update once a minute whether the screen is in low or full power mode. I also assume full power mode means when you push a button and the screen lights up.
    There is nothing yet in System::Stats to detect low or full power mode. Maybe in a future preview/beta.

    Jason
  • Former Member
    Former Member over 10 years ago
    Found that in the "Connect IQ User Experience Guide.pdf" file (SDK 0.2.4) :

    "Watch faces update at once a minute in low power mode, or once a second when in full power mode. The watch will transition out of low power mode when the user gestures to look at it. A watch face can detect if it is in low power mode or not by getting the system stats from Toybox.System."

    Isn't it true for the moment ?


    I think this is how the original default watch face operates. The custom ones only operate in low power mode at the moment.
  • Former Member
    Former Member over 10 years ago
    I think this is how the original default watch face operates. The custom ones only operate in low power mode at the moment.


    Yes, but note the "s" in the sentence : "Watch faces update at once ...". And this sentence is taken from a doc describing good practices in implementation for developers... So, it should be true for all watch faces. But I suspect it isn't actually.

    Anyway, this can be checked by doing tests on the systems stats from Toybox.System...
  • Yes, but note the "s" in the sentence : "Watch faces update at once ...". And this sentence is taken from a doc describing good practices in implementation for developers... So, it should be true for all watch faces. But I suspect it isn't actually.

    Anyway, this can be checked by doing tests on the systems stats from Toybox.System...


    We are still only at preview 2, I am sure they will continue to add/remove features based on testing and feedback. I don't think anything is set in stone at this point.
  • Former Member
    Former Member over 10 years ago
    I could use some help.

    The documentation says that the device's "low power mode" status is available in Toybox.System SystemStats. But I don't see it available there. All I see is battery, freeMemory, totalMemory and usedMemory in Class: Toybox::System:Stats.

    Can anyone set me straight, or better yet share an example of how to access the "low power mode" status?
  • Former Member
    Former Member over 10 years ago
    It looks like the documentation is a bit out of date. The low power mode status was implemented a bit differently from what you are describing.

    To use the power modes, you need to use the WatchFace class. This class has two methods called onEnterSleep() and onExitSleep(). Implementing these functions will allow you to receive events when the device enters and exits sleep. When the device is out of sleep, you are allowed to run timers, and onUpdate will run every second. The sleep entry and exit can be manually controlled in the simulator via the menus. The Forerunner 920XT does not currently support sleep modes, so it is not yet possible to test this on a device.
  • It looks like the documentation is a bit out of date. The low power mode status was implemented a bit differently from what you are describing.

    To use the power modes, you need to use the WatchFace class. This class has two methods called onEnterSleep() and onExitSleep(). Implementing these functions will allow you to receive events when the device enters and exits sleep. When the device is out of sleep, you are allowed to run timers, and onUpdate will run every second. The sleep entry and exit can be manually controlled in the simulator via the menus. The Forerunner 920XT does not currently support sleep modes, so it is not yet possible to test this on a device.


    Hmm, I was thinking that was when you went into Sleep mode, to turn activity tracking into sleep tracking and turn notifications off.
    Is there a separate section for going to sleep, and low power?
  • Former Member
    Former Member over 10 years ago
    I think the sleep mode for the activity tracking will be controlled by native functionality and the interface will be determined by the particular product. The ActivityTracking module does have a sleep mode boolean to allow displaying the status on a custom watch face.
  • I think the sleep mode for the activity tracking will be controlled by native functionality and the interface will be determined by the particular product. The ActivityTracking module does have a sleep mode boolean to allow displaying the status on a custom watch face.


    Thanks I will look for that bool this weekend when I get a chance to work on my watch face again.
  • Former Member
    Former Member over 10 years ago
    Hello,

    I am developping a binary clock as watchface for my vivoactive. I wanted to display seconds and update the step counter each second, but after reading this thread, i am not sure it is possible, even...

    I still have a question :

    When i create a new project watchface, the simple time is displayed on the simulator.
    - if i enter in power low mode at minX:30s, we enter in the onEnterSleep() and the onUpdate() will be called about 1 minutes later.
    So on the simulator, the watchface is 30s late from the computer time.....

    Now, on my device, I am using the Big Time watchface. And when i'm trying the same test (enter in the low power mode at half minutes), I realize the Big Time watchface is updated exactly when the minutes change, ie at min(X+1):00s, even if we are still in the low power mode since less than 30s... How is it possible ?

    I also can explain the Big Time watchface does not display second in the low power mode, and displays i in the non low power mode. The seconds are shown in the middle of the screen, replacing the ":" of clock "HH:MM".

    Could you explain me how that is possible ?