Ui.BehaviorDelegate: onKey(evt) not called on Fenix 3?

I developed a stopwatch widget which has worked fine for a long time. Now I receive feedback from some users saying that they cannot reset it. Their devices are the Fenix 3 HR and the Forerunner 235.

The code is the same for every watch, and it works fine on a real Fenix 5 (with the intermediate menu being shown), and on a real Vivoactive HR and on all devices in the sim.

I use onKey() event to manage the input. Maybe the problem is easily solvable by using onMenu() instead, but I thought it was worth to leave it as it is and report what I consider to be a bug.

Link to the widget
https://apps.garmin.com/en-US/apps/3...2-064f5d04681f


Input delegate

(Sorry for the format, but the "forum bug" wouldn't let me post it otherwise

class InputDelegate extends Ui.BehaviorDelegate{
function onKey( evt ){
var key = evt.getKey();

if
(
key == KEY_ENTER
)
{
// Action 1
return true;
}
if
(
key == KEY_MENU
)
{
// Action 2
return true;
}
​​​​​​​
return false;
}
}
​​​​​​​
  • Assuming you haven't defined KEY_ENTER and KEY_MENU elsewhere, does prefixing them with Ui.* make a difference? In my onKey handlers I usually reference those constants with Ui.KEY_ENTER or WatchUi.KEY_ENTER depending on how I use Toybox.WatchUi.
  • This is a good remark, but I don't think this is the reason because:

    1) The same code works on most devices and in the sim.
    2) If that would be the reason, the users would get an IQ! error ("Symbol not found").
    3) The Input sample on the SDK uses KEY_ENTER and KEY_MENU without defining or prefixing them.

    Do you own a Fenix 3? Do you use onKey() to handle Ui.KEY_MENU?

    Can someone with a Fenix 3 check if the Input example works as in the sim?

    Thanks for helping!

  • I always use Ui.KEY_*. and almost always onMenu instead of KEY_MENU. Is this something that just stopped working with a FW upgrade?
  • This is what I guess (stopped working with a FW upgrade).

    And that's why I would like to fully understand what happened. Fixing the problem specifically for this app isn't the most important now. I'm quite sure I could solve the problem by using onMenu. But if it has to do with the suffix, then it's probably an issue that will appear on other devices, and maybe I (and possibly more devs) will have to revise other apps. Also the sim and the sample must be adapted.

    Or maybe it's something completely different (in my code or in the FW). Unfortunately I don't have a Fenix 3 to test.


  • This is a case where asking the user to check the version of CIQ on the watch could also add insight. Get the FW version, but in "about, it also shows the version of the VM along with other things like GPS.

  • I just tested out your stopwatch app and the input sample on my fenix 3 and all seemed to be working fine. I was able to reset the timer without issue, and the input sample on the watch performed effectively identical to the simulator. The version of your app tested was 2.3b-upd and the f3 was running SW 8.30. Have you seen any reports of misbehavior on a f3, or has it only been the f3HR and the fr235?
  • There's an 8.35 beta release for the f3 here.

    Is the user running that?
  • r.485 ,

    I've been working on this and trying to reproduce it with your app in the public store. I've tested on both fenix3 HR and Forerunner 235. So have I am able to reset and/or stop, then reset as often as I like. I'm really not sure why this is happening. Is it possible that you could send me a .zip file of a development build (maybe with some helpful logging info in it) to [email][email protected][/email]? If we can get it to break or fail while using a dev build we should be able to pinpoint it. Maybe try putting some logging info in the KEY_MENU handler so we know that if it is getting called or not?

    Thanks,
    -Coleman
  • Thanks everyone for the answers, ideas and for testing on your devices. I really appreciate that.

    I got one email from a Forerunner 235 user, who didn't replied me back, and a review from a Fenix 3HR user. I couldn't gather more information (FW version etc.).

    Meanwhile, I also got another bad review from a Fenix 5X user saying that he could not reset. But I think it's because he didn't read the description where I mentioned the new intermediate menu. (I mean the "standard" widget menu, on which you have to choose the first option to trigger onMenu() or onKey() of the CIQ widget).

    I wonder if this is the source of the problem. Was the intermediate menu introduced on those watches too?


    Coleman.ConnectIQ, thanks for taking your time to look at this. But if it works in the sim and for everyone's watches here, I consider that there's nothing wrong with the app or with the firmware.


    PS: little (misplaced) bug report: user names like 927dc22a-13a1-4eff-99df-62a3578246e4 are appearing on the reviews.
  • Glad to be able to help how we can. The intermediate menu is isolated to the the fenix 5 and variant devices. There has to be some sort of one off issue. We'd need to get some more info from them to get much further. Regarding the bug, we've got the app store team working on it.

    Thanks,
    -Coleman