Swipe left working in simulator but not on device

Hi,

In my BehaviorDelegate, I "map" the swipe left input to the onSelect behavior:

class MyDelegateDelegate extends BehaviorDelegate {
    public function onSwipe( swipeEvent ) {
        if( swipeEvent.getDirection() == SWIPE_LEFT ) {
            return onSelect();
        }
        return false;
    }

    public function onSelect() as Boolean {
        // Action
    }
}

This works in the simulator for my Epix Pro Gen2, but not on the real device.

Other swipe gestures that are automatically tied to behaviors work on the device, like swipe up/down to trigger onNextPage()/onPreviousPage() or swipe right for onBack().

When I swipe left with the clicked mouse in the simulator, the onSelect() is triggered correctly. On the device instead onNextPage() or onPreviousPage() is triggered.

What could I be doing wrong?

Top Replies

All Replies

  • I updated a previous comment with a hack that could be used to ignore a behavior (like onNextPage), but remember what the behavior was so you can act on it when you receive the corresponding key/tap/swipe. 

    Would be interesting to know how wide spread this discrepancy/bug is. Unfortunately I only have that physical Epix for testing.

    Bug report is now here:

    forums.garmin.com/.../swipe-left-behavior-different-between-simulator-and-device

  • Actually on my Epix the behavior of native apps and CIQ is not the same. In the native apps that I have tested, swipe left acts the same as the select button, bringing in a detailed view from the right side.

    I will say that other watches are like this as well -- but it's a very limited behaviour. It's not the same as pressing START (or "selecting" things) in general.

    I see it in native apps like the heart rate glance where:

    - there's a button hint next to the START button

    - pressing the START button *or* swiping left brings up an action menu (menu that takes up the right 2/3rds of the screen). You can also tap on the button hint.

    (This also works in an activity with touch enabled, when you edit a data page and an action menu is available with choices like Layout, Data Fields and Reorder)

    So I think that in the native UI, swipe left *will* bring up an action menu, where one is available. It kinda makes sense as the action menu slides in from the right. It also makes sense that swiping right will close the menu.

    So I was wrong to say that swipe left doesn't do anything in the native UI. (But I don't think it should be mapped to onSelect.)

    So it may be that we are seeing the same thing, and Epix gen 2 actually isn't different from other watches (in terms of the native behaviour of swipe left). The fact that swipe left triggers onNextPage() does seem to be a discrepancy and bug.

  • Understand you might see differences on different devices.  On some, a swipe from left to right triggers onBack.

    If you sideload the input sample from the SDK on your device, what do you see with the swipe?

  • On some, a swipe from left to right triggers onBack.

    Yes, a "swipe from left to right" is typically referred to as right swipe or swipe right, and that behaviour is pretty much universal on current Garmin touchscreen watches. (Very old touchscreen watches like vivoactive and fr630 use swipe right to scroll).

    OP is talking about left swipe / swipe left, which means swiping from right to left (in your parlance).

  • Even Garmin uses "swipe right" for what you refer to as "swipe from left to right", because they are talking to normal users who would also call it "swipe right".

    https://www8.garmin.com/manuals/webhelp/GUID-0221611A-992D-495E-8DED-1DD448F7A066/EN-US/GUID-F04730B5-B214-4E08-AA64-61D1C197F35F.html

  • Swipe from right to left also varies by device and the type of app. 

    So being clear with "swipe from left to right" bothers you?  It makes it clearer for others who read the posts!

  • It seems that you could do a hack which others have suggested:

    I just did an implementation in a class derived from my delegate, to keep the code for this workaround separated from the main delegate code. However not sure if I really want to use it. I am tight with memory and it is a lot of code for fixing a relatively minor issue.

    For some reason, I get an error ("you have been blocked") when putting the code in a code block, so I'll just paste it here.

    OK, I don't paste it here, I also get an error if I do that. This forum is a PITA.