Acknowledged
CIQQA-3113

bug: swipe right on the left side of the screen triggers onKey(KEY_ESC)

I noticed this with my app in simulator (fr955, SDK 8.1.1), and then I checked it with the Input sample and it also reproduces it, so it's clearly a bug both in the simulator and even on real devices (tested on real fr965). A similar bug was already reported 4 years ago: https://forums.garmin.com/developer/connect-iq/i/bug-reports/vivoactive-4s-swipe-identified-as-a-key-pressed

To reproduce:

- run the Input sample from the SDK on fr955 in the simulator.

- swipe right in a way that you touch in the middle or the right side of the screen => correctly, only swipe event is triggered

- swipe right touching in the left side of the screen => onKey(KEY_ESC) is triggered (It's not clear when this happens, in the Input sample it looks like sometimes this only happens every 2nd time you swipe on the left side of the screen)

Parents
  • Great find!

    I tested with the Input sample on a simulated fr955 and found the same thing as you did.

    Furthermore, on a real fr955, this happens consistently.

    Any swipe right starting from the left side will trigger KEY_ESC and onBack(). (On a real device, you can see both events being triggered, as the display update is fairly slow.)

    I also found that on both a simulated and real fr955, a right swipe which does not start from the left side of the screen correctly triggers onSwipe(RIGHT_SWIPE), but also incorrectly triggers onBack(). This is wrong because on real fr955, a right swipe gesture only triggers the "go back" action when it starts from the left side of screen. On most built-screens, a right-swipe that doesn't start from the left side does nothing; in other cases it pans a glance chart or the map screen.

    So clearly the built-in UI is available to distinguish between:

    1) right swipe starting from left side of screen, which should trigger onSwipe(RIGHT_SWIPE) and onBack() (or their native equivalents)

    and

    2) right swipe not starting from left side of screen, which should trigger onSwipe(RIGHT_SWIPE) and not onBack()

    But in the sim (fr955) both of those gestures trigger onBack(), but only 1) triggers KEY_ESC (only sometimes).

    On a real device (fr955) both of those gestures trigger onBack(), but only 1) triggers KEY_ESC all the time.

    To me is a huge mess because:

    - it violates an unspoken assumption that a touch gesture shouldn't be registered as a key. (Isn't that why the Input sample uses the first status line for "actions", which either keys or touch gestures?) But only the right swipe gesture registers as a key. For example, a tap doesn't register as KEY_ENTER.

    - it means that if your app to follow the native behaviour where swiping right from the left side (usually) goes back, but swiping right from anywhere else on the screen *never* goes back, it should pop the current view on  KEY_ESC and but *not* onBack(). It also means that if your app does not override onBack(), it will inherit the same bad behaviour where right swiping from the middle of the screen will pop the view / close the app. I can actually see this bad behaviour with a random device app that I installed from the store.

     

Comment
  • Great find!

    I tested with the Input sample on a simulated fr955 and found the same thing as you did.

    Furthermore, on a real fr955, this happens consistently.

    Any swipe right starting from the left side will trigger KEY_ESC and onBack(). (On a real device, you can see both events being triggered, as the display update is fairly slow.)

    I also found that on both a simulated and real fr955, a right swipe which does not start from the left side of the screen correctly triggers onSwipe(RIGHT_SWIPE), but also incorrectly triggers onBack(). This is wrong because on real fr955, a right swipe gesture only triggers the "go back" action when it starts from the left side of screen. On most built-screens, a right-swipe that doesn't start from the left side does nothing; in other cases it pans a glance chart or the map screen.

    So clearly the built-in UI is available to distinguish between:

    1) right swipe starting from left side of screen, which should trigger onSwipe(RIGHT_SWIPE) and onBack() (or their native equivalents)

    and

    2) right swipe not starting from left side of screen, which should trigger onSwipe(RIGHT_SWIPE) and not onBack()

    But in the sim (fr955) both of those gestures trigger onBack(), but only 1) triggers KEY_ESC (only sometimes).

    On a real device (fr955) both of those gestures trigger onBack(), but only 1) triggers KEY_ESC all the time.

    To me is a huge mess because:

    - it violates an unspoken assumption that a touch gesture shouldn't be registered as a key. (Isn't that why the Input sample uses the first status line for "actions", which either keys or touch gestures?) But only the right swipe gesture registers as a key. For example, a tap doesn't register as KEY_ENTER.

    - it means that if your app to follow the native behaviour where swiping right from the left side (usually) goes back, but swiping right from anywhere else on the screen *never* goes back, it should pop the current view on  KEY_ESC and but *not* onBack(). It also means that if your app does not override onBack(), it will inherit the same bad behaviour where right swiping from the middle of the screen will pop the view / close the app. I can actually see this bad behaviour with a random device app that I installed from the store.

     

Children
No Data