Android Immersive Mode target-sdk-version="23"

I’m using fbricker’s extension-admob and it requires sdk v23, so I have this in my project.xml:

<android target-sdk-version="23" if="android" />

The top bar (with time/battery/etc) is always visible and I can’t make it go away. I’ve setup a templates folder where I can override templates but don’t know what to do to hide it.

In there’s this: (I haven’t changed aanything, yet)

	public void onWindowFocusChanged(boolean hasFocus) {
		if(hasFocus) {

	private void hideSystemUi() {
		if (Build.VERSION.SDK_INT >= 19) {
			View decorView = this.getWindow().getDecorView();

It looks like it should hide it and give me fullscreen since I’m targeting sdk build v23.

Do you test it on device with android version < 4.1 ?
Because you should use different code to hide status bar on android 4.0 and lower:

Hi! we have done an extension that handles immersive mode

try using that and tell me if you have any troubles :smiley:

Thanks guys.

@restorer Yes. I was testing on 4.0. I’m looking at the link to see how I can fix this. I’m not sure what I’m doing with modifying behind the scenes templates but I need to learn.

@Joacko I’ll have a look at your extension, I’m sure it will be an easier solution for me.