Show status bar in Android in PhoneGap app (ie prevent fullscreen)

android, android-layout, cordova

Solution

I figured it out.

The Splashscreen plugin must be setting it to fullscreen. By calling the `clearFlags` method AFTER `super.loadUrl`, once the app loads the status bar shows up.

@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    super.setIntegerProperty("splashscreen", R.drawable.splash);
    super.loadUrl(Config.getStartUrl(), 10000);

    getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
}

Problem

I have a phonegap 3.0.0 application. My application covers the status bar (the thing with the clock, reception info, etc). Since i'm not a full screen game, this is not desirable. I believe it's running as a "Full Screen" app. I've found posts here on stack to do the opposite (ie make an app go full screen) and did the inverse of what was suggested. I'm wondering if something changed in PhoneGap or perhaps the PhoneGap CLI that I used to create the project because my app is showing fullscreen. I tried this: ``` public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setIntegerProperty("splashscreen", R.drawable.splash); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); super.loadUrl(Config.getStartUrl(), 10000); } ``` Which explicitly tells it to NOT be in full screen mode.... but it still shows up full screen.

Original source