Comments (10)
I can confirm that SystemGestures.isSupported is false for Android. Do you think this can be implemented for Android as well? Maybe I can find another Ane that does this.
from ane-systemgestures.
Correct, this is an iOS only extension currently.
Have you got a link to the native functionality you are looking for? Happy to look into adding it.
from ane-systemgestures.
I believe it's related to this.
I opened on a topic on the Starling forum about my issue, and someone said to use the Application ANE and set the display mode to immersive, but I don't believe they're talking about the same issue as I'm having.
https://forum.starling-framework.org/d/23851-disable-system-gesture-swipes-on-android
from ane-systemgestures.
Fullscreen immersive should allow you to get around the edge gestures I believe as Android disables them in this mode. I some updates to look into around this though as I believe some of those modes have been deprecated in the latest android sdk but I believe this should still work.
Decent overview here: https://medium.com/androiddevelopers/gesture-navigation-handling-gesture-conflicts-8ee9c2665c69
from ane-systemgestures.
All I can say is that it's definitely not working for me on Android 10. I'd be surprised if I've implemented something incorrectly since it's pretty simple. I turned system gestures on on my phone, and any swipe from the side temporarily shows an arrow and will close the app on release. The status and nav bars are never visible on my phone at any time.
Either way, it would be nice to set the exclusion rects manually. People can swipe back to exit the app if they want, but only outside of the game board, which reaches the edges of the screen.
Here's a video of how it behaves.
https://youtube.com/shorts/pQUHQsPTRoM?feature=share
I'm actually wondering if this is something specific to the Xiaomi OS, which is what I have. I need more smart phones.
from ane-systemgestures.
Yeah this behaviour is very likely tied to the android flavour you are testing on.
I've done some initial research into these exclusion rects and they are very limited. You can only specify about 200dp of vertical space that overrides the default action. So I'd have to redesign the api or something new for this.
from ane-systemgestures.
Thanks for looking into it. I'd be more concerned about the horizontal space and preventing back swipes, 200 dp would be more than enough I'd think. Even immersive mode (if I could get it working) wouldn't be great, it still tries to pre open a menu on a first swipe.
Anyways, I shrank my game board to 90% of the width of the screen. It'd be nice to have the extra space since it can be a 16x16 grid but it works for now. Thanks again for checking it out.
from ane-systemgestures.
Not to belabor this too much but is there a way to override the 'back' gesture? For most big apps (Twitter, Instagram), the back gesture doesn't close the app, but just goes to the previous screen or something.
from ane-systemgestures.
Of course, just listen to the keyboard event and then call prevent default when it is the back operation.
NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDownHandler);
function onKeyDownHandler( event:KeyboardEvent ):void
{
if (event.keyCode == Keyboard.BACK)
{
event.preventDefault();
}
}
from ane-systemgestures.
from ane-systemgestures.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ane-systemgestures.