Swipe stop to work on some devices

After the last firmware update, my widget does not work correctly on some devices (example on Vivoactive 4 with firmware version 4.00).

The problem: swipe up/down doesn't work as required (changes the information displayed) but exits the widget and goes to the next one.

Note that the widget worked well with previous firmware versions for Vivoactive 4.
I downloaded the latest SDK 3.1.7 and rebuilt the package but the problem persists. The previos package was created with SDK 3.1.6, so I don't expect big changes in the SDK.

What changes in the latest firmware version of Vivoactive 4? This is a major version change (from 3.xx to 4.00), so the changes may be relevant.

Thanks

  • You're using a second view with it's own delegate, correct?  Not just using the same delegate as the top view, and having the up/down handing there

  • Yes, I have a main and a secondary delegate .

    I use Toybox.WatchUi.pushView to go from the main to the secondary delegate (and Toybox.WatchUi.popView to go back).

    In the secondary delegate I use Toybox.WatchUi.switchToView to switch from one view to another (they are potentially "infinite" because it is a calendar application).

    The code is the same for touch and non-touch devices and it worked well on all the supported devices (until the last firmware update on some devices).

    With the Garmin simulator I have no problem for all supported devices.

    I know the problem is present for Vivoactive 4 with firmware 4.00; I also have a report of a problem on the non-touch device Forerunner 945, firmware 4.xx (I'm not sure of the version; the problem is not specified by the user, I just know the widget isn't working).

    Any help will be appreciated.

    Thanks

  • One thing to check is what you return from a handler in the delegate.  for up/down you should be returning true.

  • For the secondary delegate the code is something like:

        function onNextPage() {
            //... set some data
            WatchUi.switchToView(new CalendarView(), new CalendarDelegate(), WatchUi.SLIDE_IMMEDIATE);
            return true;
        }

        function onPreviousPage() {
            //... set some data
            WatchUi.switchToView(new CalendarView(), new CalendarDelegate(), WatchUi.SLIDE_IMMEDIATE);
            return true;
        }

    Thanks again

  • Try a test where instead of switchToView use pushView.  Not sure but your new view might be considered the main view with what you're doing.

  • I did a quick test with the simulator for Vivoactive 4 and also with a real device (Forerunner 235).
    In both cases it doesn't work to change switchToView with pushView:
    the multi call to pushView requires an equal number of calls to exit the widget (so if I call pushView 10 times I have to call popView 10 times to exit the widget).

    I would like to highlight the points:
    - it is not possible to reproduce the problem of Vivoactive 4 with the simulator (SDK 3.1.7)
    - the widget runs without problems with the Vivoactive 4 firmware version <4.00

    Hope you can help

    Thank you

  • if you do a pop view before you push, you should only have 2 views on the view stack at any given time

  • I have experienced the same problem with my widget.  It worked fine until I updated fw on my VA4. The secondary behaviorDelegate no longer registered onNextPage or onPreviousPage or onSwipe and, instead, scrolled to next or previous widget.

  • I tried the proposed solution but it doesn't work. I do a pop before the push, something like (pseudo-code):

        function onNextPage() {
            // ....
            if ( it_is_not_the_first_call ) {
                WatchUi.popView(WatchUi.SLIDE_IMMEDIATE);
            }
            WatchUi.pushView(new WeekCalendarView(), new WeekCalendarDelegate(), WatchUi.SLIDE_IMMEDIATE);
            return true;
        }

        function onPreviousPage() {
            // ....
            if ( it_is_not_the_first_call ) {
                WatchUi.popView(WatchUi.SLIDE_IMMEDIATE);
            }
            WatchUi.pushView(new WeekCalendarView(), new WeekCalendarDelegate(), WatchUi.SLIDE_IMMEDIATE);
            return true;
        }

    It is necessary to check if it is the first call otherwise the code doesn't work. The code works on a Forerunner 235 (but it is necessary to press twice the back key to exit from the widget). The code doesn't work on a Vivoactive4 fw 4.00: the problem is the same.

    First important point: the problem is present on the Vivoactive4 also if I change switchToView  with pushView. Maybe the swipe action is not "delivered" to the widget by the system?

    I did another test: I tried an example from the SDK 3.1.7: samples\ActivityTracking. The example works well on the Forerunner 235 but not on the Vivoactive4 (same problem).

    Second point: we have a simple example (samples\ActivityTracking) to reproduce the problem on the Vivoactive4 fw 4.00.

    Maybe it is a bug that must formally be reported to Garmin.

    Any help/suggestions will be appreciated.

    Thanks

  • So I'm not the only one who has the problem.
    Thanks for the information.