Widget structure

Hi all,

I'm trying to develop a widget that is similar to the stock Weather or Metar ones in the sense that you can enter the widget and then navigate within them by using the up/down, select and back buttons.

I have found that in CIQ, back always brings you to the watch face, and up-down are only used to navigate within the widget carousel. Only the Enter/Select button is available, which can be used to cycle through the widget, but this makes for an inferior user experience.
I also noticed that MyMetar has a menu. I tried using onMenu() but it is not captured by BehaviorDelegate. Also, a long-press on "Up" could theoretically be manually detected but again, the up button brings you to the previous widget.



I would like to know if there is any way to solve that issue to improve UX.

Having access to a custom menu would be already a good help (like MyMetar), and full navigation with up/down and back buttons would be perfect.

Thanks
Julien
  • Former Member
    Former Member over 9 years ago
    From the main screen of the widget, you can't use the onNextPage/onPreviousPage behavior (up/down buttons on most devices), because it's reserved to bring you to the next widget.
    If you switch to another view, that new view becomes the main view and will also have those restrictions.

    If you push another view, you won't have these restrictions and should have no problem implementing the required behavior delegates to navigate as you described.
  • Hi TeunMo,

    Thanks a lot for your answer.

    I already used pushView thinking this would solve the problem but it didn't. Here's a video that shows it.

    https://youtu.be/nwj--tuRAEk

    I'm now thinking this could be due to the D2 Bravo running older software than the Fenix 3. We know that the D2 Bravo isn't given as much attention (still only runs CIQ 1.1.3 even with latest fw is 2.40), and perhaps the software has a bug?

    Did you manage to make pushView enable navigation in your widget with up/down?
  • I noticed from your video that you aren't returning anything explicitly from onPreviousPage() and onNextPage(). Have you tried returning true from these functions? I believe that if you don't indicate that you've handled inputs, the system will process them for you.

    Travis
  • I have a widget that does exactly what you want. I am using key events in both views rather than onPreviousPage/onNextpage in the pushed view, but I think the key difference is that I am returning true from the function as Travis suggested.
  • Thanks, it worked. The problem was that I didn't return true.

    The problem regarding menu is still valid. It seems onMenu() isn't called if I long press the Up/Menu button. I'm using a work-around where I manually time the press and if it exceeds 250ms I go into my menu. But I was wondering if there was a better way. Did you manage to use onMenu()?

    Thanks!
  • I'm using key events, but I do successfully manage to capture the menu key:

    } else if (key == Ui.KEY_MENU) {
    // The menu key will be used to reset the location
    Ui.pushView(new LocationView(), new LocationDelegate(), Ui.SLIDE_RIGHT);
    }
    return true;
  • Former Member
    Former Member over 9 years ago
    The menu behavior should work. I'll report this as a bug to the product team.