How can I cancel exit when cancel key pressed ?

Former Member
Former Member
I found some wedget and app don't exit auto when runing. How to do this with code. I think the xxxxxApp class need modify.
  • In your delegate, in general, what you return indicates what you want the firmware to do.

    For something like onBack(), if you return true, you indicate you handled the key and the FW shouldn't take it's normal action, while if you return false, you are indicating the FW should take it's normal action.
  • In your delegate, in general, what you return indicates what you want the firmware to do.

    If we are talking about back button presses, then Jim is right. You just have to return true from the function and the framework will behave as if your code handled the input. If the question is about the automatic that happens after a period of inactivity, there is no delegate function to handle this.

    ConnectIQ wearable apps should not be subject to an automatic exit timeout, and widgets are. I don't believe that there is anything you can do in a widget to prevent the automatic exit that happens. Do you know of a widget or wearable app that does not follow this pattern?

    Travis
  • yes, with widgets, what I call the "Revert Timeout" is really unavoidable. It ranges from about 10 seconds to a couple minutes, based on the device. (How long before a widget automatically goes back to the watch face in other words :) ). A user can extend it a bit by, for example, tapping on a touchscreen device as that resets the timer, but that's it)

    If you need to have something that runs longer, look into making it a watch-app...
  • Former Member
    Former Member
    thx @jim_m_58 & @TRAVIS.VITEK

    But I fount the official Heart Track can always turn on.
  • If you mean the native HR widget, it does time out -I just checked on a f5. It might be the timeout for that one is a bit longer though, as it's a native one that does some special things.
  • Former Member
    Former Member
    @jim_m_58
    this widget:

    and this interface:


    It will always track your heart and never quit.
  • Former Member
    Former Member
    Jim is correct here. Based on the pictures you provided, you are looking at the native (built-in) heart rate widget. This is built into the system software and can take more direct control of the hardware than Connect IQ can. The interface you are seeing is the "Broadcast Mode" on the device. This broadcasts the HR data using the ANT+ chip on the device. Unfortunately, Connect IQ widgets do not have the ability to override the time-out limitations for battery saving purposes. Hopefully this will clear things up a little for you.

    Thanks so much,
    -Coleman
  • I don't have that watch, but as I said, on a fenix 5 it does time out. But it really doesn't matter, as it's a native widget, and isn't written in Connect IQ. CIQ widgets on watches will always time out, and there is no way to avoid that.
  • Former Member
    Former Member
    It is clearly. Thank you so much. Now I know the function of system.

    Jim is correct here. Based on the pictures you provided, you are looking at the native (built-in) heart rate widget. This is built into the system software and can take more direct control of the hardware than Connect IQ can. The interface you are seeing is the "Broadcast Mode" on the device. This broadcasts the HR data using the ANT+ chip on the device. Unfortunately, Connect IQ widgets do not have the ability to override the time-out limitations for battery saving purposes. Hopefully this will clear things up a little for you.

    Thanks so much,
    -Coleman


    I don't have that watch, but as I said, on a fenix 5 it does time out. But it really doesn't matter, as it's a native widget, and isn't written in Connect IQ. CIQ widgets on watches will always time out, and there is no way to avoid that.