Handling Long Button Press

Hi,

Is there any recommendations on handling a long button hold? I am trying to implement a reset on a App, but only want to happen if the user holds a key for a few seconds.

Cheers
Chris
  • handling long button press

    I agree. This functionality is useful, but does not work for me yet. I have a FR630. Please let me know when this functionality works - I would like to implement it on my watch - not just on the simulator!
  • I did some testing, and it appears that no devices generate the onKeyPressed() or onKeyReleased() events at all. I've tested on several devices and I'm unable to do anything to generate those events.

    Travis
  • Any plans on getting this fixed? It still doesn't work on my 630. I was hoping it was just in the BehaviorDelegate that it didn't work but it also doesn't work in the InputDelegate. Works like a charm in the simulator, though, with either Delegate.
  • Any plans on getting this fixed? It still doesn't work on my 630. I was hoping it was just in the BehaviorDelegate that it didn't work but it also doesn't work in the InputDelegate. Works like a charm in the simulator, though, with either Delegate.


    Have you contacted the Connect IQ team about this? I'm not sure what devices Travis tested on but my METAR/TAF widget uses both methods in a class that extends BehaviorDelegate and it works for the fenix 3 and derivatives (ie. D2 Bravo). The API docs list the methods as available since 1.1.2 but perhaps this is a case of functionality that is only available on certain devices?
  • Have you contacted the Connect IQ team about this? I'm not sure what devices Travis tested on but my METAR/TAF widget uses both methods in a class that extends BehaviorDelegate and it works for the fenix 3 and derivatives (ie. D2 Bravo). The API docs list the methods as available since 1.1.2 but perhaps this is a case of functionality that is only available on certain devices?


    I know general device issues, I need to contact Garmin directly as posting here doesn't generally get much attention. But it has seemed with the ConnectIQ threads, Garmin folks are monitoring things pretty closely and often responding. So I was hoping posting here would be enough. Anybody have suggestions on the best way to contact Garmin for these kinds of issues?

    On a side note, since I just wanted to use the long press to reset a timer, I just made it so that if I press the button quickly twice (less than .7 seconds) it does this. Not as good a solution, but works.
  • I had the same thing occur with my FR630. I got the above described procedures working successfully on some programs I side loaded (in earlier SDKs) but after some revisions it stopped working for some reason (although still worked fine in the simulator).

    When I read some more information about the above solution on this forum, I remember reading it didn't work for all buttons or watches, and because of that, I decided to forget about implementing it. Rather than struggle with getting it to work on my 630 (and have no similar functionality on some platforms or some buttons), I just removed the functionality and "settled" with no long button press functionality. Hopefully someone can look into this.
  • I've verified (again) that this doesn't work on any of the devices that I'm testing with. I've reported the problem to Garmin, but I don't know what the status of that issue is.

    Travis
  • I've verified (again) that this doesn't work on any of the devices that I'm testing with. I've reported the problem to Garmin, but I don't know what the status of that issue is.


    For reference, what devices are you testing with, Travis? I am thinking about extending one of my apps to other devices (other than the fenix 3+) and this will definitely inhibit the UX.

    Cheers,
    Douglas
  • For reference, what devices are you testing with, Travis?


    The onKeyPressed/onKeyReleased functions do not get called at all on the following devices.

    fr920xt
    fr735xt
    fr630
    edge_1000

    I found that the vivoactive does correctly call onKeyPressed/onKeyReleased for the physical enter button as well as the virtual back and and menu buttons. It does not work at all for the light/power button.

    Travis
  • Hi Travis, I'm implementing a long-press on "enter" key as shortcut for non-touchscreen devices, do you know if the

    onKeyPressed and 
    onKeyReleased

    are working on devices supporting 3.1.x?

    Thanks!