How do I Remove Android status bar, using Intel XDK

0 favourites
  • 11 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • Does anyone have experience with this? I am publishing for Android with Intel XDK.

    In Intel XDK there is a tickbox for 'Full Screen'. If deselected, the Android status bar and navigation bar is visible in the built game.

    If the 'Full Screen' tick box is selected neither the navigation bar nor the status bar are visible.

    I want the nav bar to be present, but not the status bar. I think the way to do it, is to have 'Full Screen' deselected and then add the status bar plugin, and then somehow edit that plugin so that on start, the status bar is hidden.

    In the documentation for the status bar plugin it says that the status bar can be hidden, and gives some code to do it...

    But I have no idea where to enter that code, which file needs to be updated, or how to do it through Intel XDK.

    Can anyone offer any advice on this?

  • In XDK, in the Cordova Hybrid Mobile App Settings, Add Plugins to this Project, scroll down and pick StatusBar.

    To call it from C2:

  • Thanks for your reply This helped a lot. I didn't understand that I needed to call the 'StatusBar.hide' attribute from C2.

    My game is now working they way I was aiming for. By leaving 'Full Screen' deselected in Intel XDK, and then hiding the status bar using this method above, both the status bar and navbar are hidden while the game is running but can easily be accessed by touching the edge of screen, which is fine, because it provides an easy way to quit out of the game if needed.

  • When you export cordova project in C2, there's an option to hide the status bar. Did you try that to see if works too?

    I have no problems with that option and fullscreen option in xdk, both checked.

  • Hi, yes I always have the 'Hide status bar' option ticked in Cordova export. It doesn't seem to do anything tbh.

    Well... the problem for me with using the 'fullscreen' option in XDK is that makes both the status bar AND the nav bar hidden and inaccessible. What I was initially aiming for was to have the status bar hidden, but the nav bar visible at all times during game play to provide an easy way to quit out of the game. So the 'Fullscreen' option didn't allow that.

    The method above works for me:

    -'fullscreen' unticked in XDK - this makes nav bar and status bar both visible during game play

    -Add status bar plugin in XDK. Call 'StatusBar.hide' in C2 - this causes both the nav bar and the status bar to initially be hidden during game play BUT they both become visible when the player touches the edge of the screen.. allowing an easy way to quit from the game via the nav bar. This isn't exactly what I was trying to achieve but it's close enough that i'm happy with it.

  • ...This isn't exactly what I was trying to achieve but it's close enough that i'm happy with it.

    Nice to see you solved the problem. May be a good idea to do some type of plugin for C2 to call statusbar xdk plugin functions, i think i'll do it in a few weeks . Will you need to solve this issue in more apps?

  • Will you need to solve this issue in more apps?

    Well I am currently working on my first game. But once i get this one finished I have a million ideas falling out of my head for future games, so I'll probably be battling with these kinds of issues in the future. Hopefully the status bar issue is resolved for me now though. But if you made a plugin that gave a bit more control: allowing the nav bar to be visible at all times for eg, that could be useful?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > Will you need to solve this issue in more apps?

    >

    Well I am currently working on my first game. But once i get this one finished I have a million ideas falling out of my head for future games, so I'll probably be battling with these kinds of issues in the future. Hopefully the status bar issue is resolved for me now though. But if you made a plugin that gave a bit more control: allowing the nav bar to be visible at all times for eg, that could be useful?

    The plugin will call the methods of the official cordova plugin: github.com/apache/cordova-plugin-statusbar

    I think these will be pretty good and useful:

    StatusBar.overlaysWebView

    StatusBar.styleDefault

    StatusBar.styleLightContent

    StatusBar.styleBlackTranslucent

    StatusBar.styleBlackOpaque

    StatusBar.backgroundColorByName

    StatusBar.backgroundColorByHexString

    StatusBar.hide

    StatusBar.show

  • In XDK, in the Cordova Hybrid Mobile App Settings, Add Plugins to this Project, scroll down and pick StatusBar.

    To call it from C2:

    Thank you, this also helped me.

    I would also like to ask something, I do not get the full screen in the latest version of XDK for android.

    I select cordova CLI 5.4.1

    Active Fullscreen in XDK

    A project with this resolution:

      400x240

    It looks full screen.

    But a project with this resolution:

    854x480

    Not seen in full screen

    But I do not get full screen in 854x480, can anyone help me ?.

  • You have 'Fullscreen' ticked in XDK? Under Build Settings > on the Android and iOS tabs.

  • You have 'Fullscreen' ticked in XDK? Under Build Settings > on the Android and iOS tabs.

    Of course, I have it activated.

    This problem also occurs in cocoon io with webview, with canvas + and webview + I have not tried.

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