Phonegap fullscreen Android application

Phonegap fullscreen Android application

If You want to switch Your Android Phonegap application into fullscreen mode use following tutorial:

All you have to do is to edit your main Activity.java file and do the steps below:

  1.  Open Your main Activity.java in /src/ directory
  2.  Add “import android.view.WindowManager;
  3.  Add the code below, after “super.onCreate(savedInstanceState);” in the middle of that << and super.loadUrl

Final code of main Activity.java should be the same as the code on example below:

public class CordovaApp extends CordovaActivity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// fullsceen the app requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN|
WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
// end of fullscreen app super.init();
// Set by <content src="index.html" /> in config.xml
loadUrl(launchUrl);
}