How do I hide the navigation bar in Android Lollipop?

Get help using Construct 2

Post » Mon Feb 23, 2015 3:36 pm

Hey, so I asked a similar question on how to make the game full screen and yes I know you check the full screen option in Intel XDK, but that still doesnt hide the navigation bar which is totally possible in android lollipop as its done in the YouTube app. So I am wondering if anyone here has any prior experience on how to do this with either construct 2 or Intel XDK. I did some research and found this: ... een-plugin ,but cant get it to work, maybe its because I dont know how to install the plugin or how to put the code in and where to put the code in.

I also found this thread on the forum plugins-cordova-related-c2-plugins-crosswalk-list_t109586?&hilit=navigation+bar+hide+navigation+bar&start=310 where they talk about immersive mode, and the plugins are made by cranberrygame, but I would have to buy the whole pack in order to get immersive mode.

Please help as I want my game to take advantage of the "true" full screen on android lollipop or also called immersive mode, and maybe you guys know a better way of doing it.
Posts: 24
Reputation: 302

Post » Tue Feb 24, 2015 1:20 am

Paste the following JavaScript in the <Body> tag of the index.html file

<!-- MY CODE START -->





// When ready...
window.addEventListener("load",function() {
// Set a timeout...
// Hide the address bar!
window.scrollTo(0, 1);
}, 0);


function hideAddressBar(){


<!-- MY CODE END -->

It covers several triggers that should remove the address bar.
Posts: 673
Reputation: 9,348

Post » Tue Feb 24, 2015 10:44 am

Hey, thanks for the reply, but it still doesnt work :c Here is a screenshot (I cant upload it here so I uploaded it to imgur), and maybe I am doing something wrong. When I try the apk on my nexus 5 the navigation bar still shows the back/home/multitasking bar is still there and doesnt dissapear.

Thank you
Posts: 24
Reputation: 302

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests