onMenu not working in app any more

Hi guys,

I recently realized that pressing the menu button in my app does not execute the "onMenu" code but opens an intermediate menu. There I can choose to execute my applications code or navigate to settings and other sub menus. On the simulator the onMenu code is executed immediately. Is this expected behavior on the device itself? Because in that case it makes no sense any more to use "onMenu" in apps.

SDK: 2.3.2

Thanks!

Bye
  • Your talking from an standard activity, possibly with CIQ fields. This doesn't work from a CIQ App. Am I missing something?

    Long press of down works for me from all the CIQ apps I have tried. In fact if you are running a CIQ watch face it returns you to one of the "stock" watch faces because you cannot run two CIQ programs at the same time (other than data fields).

    Maybe the app you are using intercepts the KEY_CLOCK key which would prevent this from working?
  • With the 5.83 beta FW for the f5 devices, the extra menu has been removed for CIQ watch-apps! :)
  • There seems to still be an issue with the logic behind onMenu in 6.00 FW of my Fenix 5: in my apps, when pressing onMenu, I can see the system menu for a short moment, then it executes my code. But when I press the back button, it navigates to the system menu first, and I have to push "back" again to reach my starting point of onMenu. Is this expected behavior?

    Bye
  • I don't see that on a f5 with the 6.00 FW.

    For a watch-app, it goes right to my app without the system menu, and "back" doesn't have any odd side effect.

    With widgets, there is the system menu, and when I press menu and get to my widget, "back" returns me to the widget.

    In other words, It's working as it should for me.
  • The process is as follows:

    - navigate into an app that changes screen with onMenu (UP long press)
    - during the transition the system menu should be visible but the transition ends on the new app screen
    - when pushing back button the app navigates back to the system menu
    - on next back button press it navigates to the initial app screen

    you can check this with this app: https://apps.garmin.com/en-US/apps/ab786a33-f914-409e-bb9c-23e8c4ef4e52

    Bye
  • So, in summary does this mean that widgets can no longer have menus? And is this the reason that my widget is broken and when you press the up button in the simulator for some watch types, a blue triangle appears in the watch screen and the console says "Complete" rather than open the menu or even throw an error ? Or is there a new syntax to get menus to work?

    Thanks,

    R.
  • You can still use menus in widgets (or, more precisely, you can still use the function onMenu() of the behaviour delegate), but an intermediate menu will first appear on some watch models (e.g. Fenix 5). The code in onMenu() will be called if the user picks the first option of this intermediate menu.
    (side note: be aware that the function onShow() of the current View of your widget will also be called when that menu is dismissed. It's just a detail and won't cause problems in most cases, but I had an issue with that in one of my apps)

    Pressing UP, DOWN or BACK will normally close a widget, unless you have pushed more than one View and handled these input on its InputDelegate. This is why you're seeing the blue triangle and the message "Complete" in the simulator. This means that you have closed the widget.

    On devices like the Fenix 5, you must press and hold UP to trigger the onMenu() behaviour.

    If you still have doubts, post a piece of your code so that we can directly comment on it.