Issue with menu/picker in FR235

Hi,

I have developed a timer widget, in which you can set the desired time using a number picker (in steps from 5 sec to 100 sec).
It works fine in all devices on the simulator, and also on my Fenix 3.

I got feedback from one user that he could not set the time on his FR235, but I can't find any reason why it should not work. Can anyone who has a FR235 check whether this works well on his device?

Setting the time is demonstrated in this video: https://youtu.be/2gQ4hn2XMvo

The widget can be installed from here: https://apps.garmin.com/en-US/apps/3293c9b6-ed58-4853-86c6-bc5859508d2e

Thanks for your help!
  • set the desired time using a number picker (in steps from 5 sec to 100 sec).

    You should avoid writing code to use the NumberPicker. It has been deprecated. You should use the generic Picker.

    It works fine in all devices on the simulator

    The simulator is only good for determining the placement of drawables (text/bitmaps/...) for each device. It doesn't behave differently for each of the different device models, and it doesn't reflect the quirks of the software on each device either.

    Setting the time is demonstrated in this video: https://youtu.be/2gQ4hn2XMvo

    This video is private, so we can't view it. Now it is public.

    Travis
  • Hi,

    I have tested this for you on my 230, which uses exact same firmware as 235.

    I can confirm something is definitely not working:
    When activating the settings for the Timer widget by holding the up button for a second or 2, the menu with options for Beep and Interval Time is displayed. But when selecting any of them, nothing happens except that the menu item is highlighted.

    There is no way to exit the menu to return to the widget or watch face, other than to wait for the widget time out which then returns to the watch face.

    Not sure what the cause is, but could be a device compatibility issue.

    Please share the part of the code that should display the picker and I can take a look.
  • Issue with menu/picker in FR235

    Hi,

    Thanks for this feedback. The source code is here: https://gitlab.com/harryonline/timerwidget/tree/master/source
    The menu is in TimerWidgetDelegate.mc, the picker is in TimerPicker.mc

    Kind regards,

    Harry
  • Like Travis I can't watch the video (it's private), and I see what Hermo does on a 230. You select one of the two menu items, it gets highlighted, and then just sits there until the widget reverts to the watchface. Normally the "Back" button would just return to to the widget if you didn't select anything, but that also doesn't work.

    Posting code for this would help a bunch, and include where you are handling the Menu key (That's what holding "up" is with 23x devices), as the failure of the "back button" makes me think there's something odd in the way you display the menu or in how you are catching the key events to display it.
  • I see a handful of issues that could cause this problem.

    The first is that you don't appear to be returning from many of your functions. If you don't return a value explicitly, something will be returned, but it is hard to know what will be returned. Typically, functions on delegates will return true to indicate the event was handled.

    Second, the docs say not to override handleEvent, but you're doing just that (not to mention you're not returning the value it returns).

    One other note- you are explicitly exiting from the base input handler methods. you should not need to do this.
  • I agree with Travis, but I'll add one more. If you want to support the va or va-hr at some point, using "tones" is a problem. They don't support that and may cause a "IQ!"

    Do away with the "handleEvent" and add the correct returns values, and we can try again for you as that could be the cause.... (acually, based on what I saw on the 230, "handleEvents" would explain most of it)
  • Thanks for your critical look at the code!
    I tend to say 'never say never', and overriding the handleEvent function seemed an elegant way to reset a timer to know when the widget will timeout, but it should indeed return the value, which I agree is the most likely cause for the failure in FR235.
    Anyway. I removed the handleEvent override and added the return statement, would you mind checking it again? The new version has been uploaded to the store.

    At this stage, I do not support the va and va-hr, as a widget returns to the watch face already after 10 seconds. That makes a timer widhet quite useless. I will have a look into the tone issue.
  • I tried the new version and it looks like it works!
  • Congrats! Success here on my side also!