@Override
    @SuppressWarnings("unchecked")
    public void onCreate(Bundle savedInstanceState) {
        initializeLogHandler();

        logger.fine("onCreate");
        super.onCreate(savedInstanceState);

        if (screenFullScreen) {
            requestWindowFeature(Window.FEATURE_NO_TITLE);
            getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                                 WindowManager.LayoutParams.FLAG_FULLSCREEN);
        } else {
            if (!screenShowTitle) {
                requestWindowFeature(Window.FEATURE_NO_TITLE);
            }
        }

        final DataObject data = (DataObject) getLastNonConfigurationInstance();
        if (data != null) {
            logger.log(Level.FINE, "Using Retained App");
            this.app = data.app;
        } else {
            // Discover the screen resolution
            //TODO try to find a better way to get a hand on the resolution
            WindowManager wind = this.getWindowManager();
            Display disp = wind.getDefaultDisplay();
            Log.d("AndroidHarness", "Resolution from Window, width:" + disp.getWidth() + ", height: " + disp.getHeight());

            // Create Settings
            logger.log(Level.FINE, "Creating settings");
            AppSettings settings = new AppSettings(true);
            settings.setEmulateMouse(mouseEventsEnabled);
            settings.setEmulateMouseFlipAxis(mouseEventsInvertX, mouseEventsInvertY);
            settings.setUseJoysticks(joystickEventsEnabled);
            settings.setEmulateKeyboard(keyEventsEnabled);

            settings.setBitsPerPixel(eglBitsPerPixel);
            settings.setAlphaBits(eglAlphaBits);
            settings.setDepthBits(eglDepthBits);
            settings.setSamples(eglSamples);
            settings.setStencilBits(eglStencilBits);

            settings.setResolution(disp.getWidth(), disp.getHeight());
            settings.setAudioRenderer(audioRendererType);

            settings.setFrameRate(frameRate);

            // Create application instance
            try {
                if (app == null) {
                    Class clazz = Class.forName(appClass);
                    app = (LegacyApplication) clazz.getDeclaredConstructor().newInstance();
                }

                app.setSettings(settings);
                app.start();
            } catch (Exception ex) {
                handleError("Class " + appClass + " init failed", ex);
                setContentView(new TextView(this));
            }
        }

        ctx = (OGLESContext) app.getContext();
        view = ctx.createView(this);
        // store the glSurfaceView in JmeAndroidSystem for future use
        JmeAndroidSystem.setView(view);
        // AndroidHarness wraps the app as a SystemListener.
        ctx.setSystemListener(this);
        layoutDisplay();
    }
Splash Screen picture Resource ID. If a Splash Screen is desired, set
splashPicID to the value of the Resource ID (i.e. R.drawable.picname). If
splashPicID = 0, then no splash screen will be displayed.
jme3-android/src/main/java/com/jme3/app/AndroidHarness.java