0 Favourites

How do I hide nav bar/soft keys on Android [cordova cli]

  • Hello!

    I have a really big problem:

    The game is in fullscreen mode and everything is just fine.

    But on some Android devices the navigation bar shows up when using the keyboard:

    After the input, the navigation bar doesn't hide anymore:

    Even after changing layouts...

    Main Menu:

    Highscore:

    I searched for this problem and it seems that some have this problem too, but there's no solution yet.

    Why is that? Building Android apps with user input is pretty useless without fixing this "bug".

    Thank you very much for your time,

    Severin

  • Push - sry, but we need to solve this. Otherwise we can't release any game on Android...

    Hasn't anybody ever released a game on Android devices? It seems like this "bug" (I'm not sure

    if it is actually a bug) already exists for many years!

    Let's solve this

    We tried a lot to solve the problem and are still trying

    Thank you very much!

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Ok, finally we found the solution:

    • Make a Cordova-Build of your project
    • Edit the config.xml and add the following: <plugin name="cordova-plugin-fullscreen" />
    • In the game create an event Browser -> Execute javascript "AndroidFullScreen.immersiveMode(function () { }, function () { });"
    • Call this event whenever you wanna hide the soft keys again
    • Before creating the build you may need to run the following command in your export folder: npm install cordova-plugin-fullscreen
  • Omg! Thanks for that!

    I was with the same problem!

    You made my day! Cheers! <3 <3

  • Thank you for sharing your solution and not just saying you solved it like others do. I found your post just in time and worked perfectly.

    If I may add, for those inexperienced programmers like myself, in orther to run the npm command I downloaded NodeJs. Dont forget to re-start your PC in order for it to work or you will waste hours trying to figure out why it doesn´t work, like I did.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)