qdrj Posted May 13, 2015 Share Posted May 13, 2015 I've encounter very annoying issue and can't fix it. It appears on Galaxy S5, default browser, Android v. 4.4.2 or 5. If user does swipe down gesture in browser - url bar comes up. On swipe up - it disappears. Gif - http://imgur.com/hvjTIdq I've tried different Phaser versions - 2.1.3, 2.2, 2.3. I've checked a lot of latest html5 games and this issue appears everywhere. You can check our latest games for example:http://robowhale.com/html5/jjump/deploy/http://robowhale.com/html5/santa/deploy/ Is there any way to fix it? Thanks in advance! Link to comment Share on other sites More sharing options...
ZoomBox Posted May 13, 2015 Share Posted May 13, 2015 Games are not supposed to be player in the default browser I believe. On a computer, it's OK since the window size is fixed and the screen is big enough.On a phone, things like this (the appearing navigation bar) happens... In order you not to have those king of problem, I believe you have to use a WebView in a compiled App. Cordova/Phonegap or CocoonJS are the most know:On android (or others) those tools create an installable application (.apk) which often contain a webview only ( a webview is a very pure web browser, with no navigation bar ...). Edit: I believe the quickest fix (with no use of apk with webview) is to manage to get the browser height in px minus an etimation of this navigation bar and scale your game's height to this value. Link to comment Share on other sites More sharing options...
qdrj Posted May 13, 2015 Author Share Posted May 13, 2015 Html5 games can be played in default browser (galaxy s3, s4 and s6 are handling them properly). Wrapping games as apps is not an option for me. I need these games can be played in mobile browsers. ... Edit: I believe the quickest fix (with no use of apk with webview) is to manage to get the browser height in px minus an etimation of this navigation bar and scale your game's height to this value.Unfortunately it doesn't work. Even if you will set game height much lesser than window.innerHeight this issue will appear. Link to comment Share on other sites More sharing options...
rich Posted May 13, 2015 Share Posted May 13, 2015 I don't know of any way to prevent OS level gestures like this from within JavaScript. I suspect there isn't one I'm afraid. Link to comment Share on other sites More sharing options...
Recommended Posts