lichobile
lichobile copied to clipboard
Android 10 Gesture Navigation problem with back gesture breaks moving pieces from columns h and a
I'm submitting a ... :
- bug report
Bug report
Current behavior:
Since Android 10 new gesture navigation, moving a piece from the side of the board during play is triggering the back behaviour, breaking the game.
Expected behavior:
The back gesture should be disabled as described in the new gesture documentation: https://developer.android.com/guide/navigation/gesturenav
Steps to reproduce:
While having Android 10 and gesture enabled, just move a piece from the h column to another column.
Environment information
Android 10 with gesture enabled on Pixel 3a.
Other information:
Thanks for the report.
We'll need to figure out if there is a place where we can insert this native code as a temporarily fix until there is an official cordova fix.
On Wed, Sep 4, 2019 at 9:35 PM martinhamel [email protected] wrote:
I'm submitting a ... :
- bug report
Bug report
Current behavior:
Since Android 10 new gesture navigation, moving a piece from the side of the board during play is triggering the back behaviour, breaking the game.
Expected behavior:
The back gesture should be disabled as described in the new gesture documentation: https://developer.android.com/guide/navigation/gesturenav
Steps to reproduce:
While having Android 10 and gesture enabled, just move a piece from the h column to another column.
Environment information
Android 10 with gesture enabled on Pixel 3a.
Other information:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/veloce/lichobile/issues/1027?email_source=notifications&email_token=AAHJC5VLIGF2DNCMV2MUEPTQIBO4RA5CNFSM4ITYJUYKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJM4ZEQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHJC5SGYHLCBGWVTEWYEPLQIBO4RANCNFSM4ITYJUYA .
Please! I "abandoned" accidentally some games due to this error. Now they want to ban me.
As a quick fix, consider turning off gestures prior to opening the app.
This is also frustrating me and has been for a year.. from the android dev doco at https://developer.android.com/training/gestures/gesturenav :
To maintain functionality of elements on the left and right edges of the screen, you'll need to opt out of the Back gesture selectively by indicating to the system which regions need to receive touch input. You can do this by passing a List<Rect> to the View.setSystemGestureExclusionRects() API introduced in Android 10.
Is this a result of the library you're using? I can have a crack at fixing it if it's not known to be impossible and this is simply a low priority.
Hi guys, I've done some more research and found on a japanese blog here: https://blog.asial.co.jp/1663 (google translate helped me here!) that a helpful dev has actually written a cordova plugin to do this for you: https://github.com/keeey/cordova-plugin-system-gesture
is this something that could help?
There seem to be a few options for addressing this issue:
- Disable the gestures during game play, as suggested by the original issue report. There exists a cordova plugin for this.
- Make the board slightly smaller, so that it doesn't occupy the area used for gestures. There exists a capacitor plugin which provides access to the boundaries of the "safe area".
- Ask for confirmation before leaving the game. This is pretty simple to implement, but a dialog still disrupts game play, so I think this is not ideal
- Simply don't allow the user to go back from the game board. Instead, they would have to use the hamburger menu to go back to the home screen.
If the lichobile maintainers could provide some guidance on what is the best approach, I am happy to submit a PR for it as this has caused my bullet rating to plummet since upgrading my phone. 😄
Thanks for volunteering @mdz ! I think the best option will be to use or develop a Cordova or Capacitor plugin. lichobile's maintainer is hard at work migrating the project to Capacitor 3, so I'd recommend holding off until that work is complete.
I'm not the most knowledgeable here, but would disabling the gestures have any compatibility issues with custom Android gesture implementations, like Samsung's game mode (requires a double swipe while in game)?
An toggle option to just shrink the board would be fairly effective, and is something I believe used to be part of the Lichess app.
@jas14 is the migration to Capacitor 3 complete? This bug is still here one year later for Android 10+ (which I guess is now almost the entire Android user base?)
Since @mdz kindly volunteered, but was told to just wait a bit, it would be great to know if this is addressable now?
Thanks for the reminder! Yes, we are now on Capacitor 3.
OK, I'll have a look
Unfortunately, I've run short of time to devote to fixing this bug. I managed to get a functional dev environment set up, but wasn't able to reproduce the bug easily in the browser or emulator, which will slow me down a lot. Perhaps someone else with interest could step in.