Android Status Bar / Fullscreen on devices with notch (SOLVED)

#1

The Status bar on my Samsung Galaxy A10 is just behind my front camera. After enabling Immersive mode in my project settings I get a black bar. That is the area of Status bar. Is there a way to set it to full screen.

I see that Playrix do it with their games where it is completely full screen.

notification

0 Likes

Is it possible to do fullscreen on devices like the Nexus 9? (DEF-1129) (SOLVED)
#2

Ok, so the area containing the notch and the status bar goes black?

What if you don’t enable immersive mode? What happens then?

1 Like

#3

If immersive mode is not enabled then it still shows the black bar where the notification bar is and the navigation bar at the bottom.

With Immersive mode enabled still the black notification bar but no navigation bar.

0 Likes

#4

I see that notch support was added in the AndroidManifest.xml in Defold Release 1.2.160 but it still does not detect it on my Samsung Galaxy A10.

0 Likes

#5

Are you sure you don’t use “Hide front camera” option on your phone?

1 Like

#6

The “Hide front camera” is disabled but still there is a black bar when I open the game. Like I said when I play other games it goes fullscreen with no black bar and around the notch.

0 Likes

#7

I investigated this question a bit and I afraid we don’t have this functionality in the engine right now. But this issue might be solved by creating of native extension or connecting style.xml file to the app.

More info here:


1 Like

#8

How would I go about extending the AndroidManifest’s style.xml? Where is this file located?

Should I create new directory in my project like: /res/values/styles.xml and then in my game project set Include Bundle Resources to /res?

0 Likes

#9

@totebo Could you please check these APKs?
APK_TEST_1.apk.zip (1.9 MB)
APK_TEST_2.apk.zip (5.7 MB)

2 Likes

#10

Same as the other games.

It works! Filling the whole screen with brilliant white. I want it! Where can I get it?

0 Likes

split this topic #11

A post was merged into an existing topic: Is it possible to do fullscreen on devices like the Nexus 9? (DEF-1129) (SOLVED)

0 Likes

#12

I’ve got immersive mode ticked and for some reason the whole screen is not used on a OnePlus Android phone. I noticed the same is true for Blossom Blast:

But other games, like this one (awesome game, by the way), use the full space:

Maybe there is an additional full screen option that’s been added since immersive mode?

0 Likes

Is it possible to do fullscreen on devices like the Nexus 9? (DEF-1129) (SOLVED)
#13

Hmm, yes, maybe. @AGulev are you familiar with this?

0 Likes

#14

Hmmm, do you use default AndroidManifest.xml ?
What is the exact model name?

0 Likes

#15

Yup.

OnePlus 6T.

0 Likes

Android Status Bar / Fullscreen on devices with notch (SOLVED)
#16

Unfortunately, I can’t reproduce this issue on the phones I have.
But I have a few ideas, I’ll try to build a few APK with different possible fixes and ask you to test on your side.
(It seems like the same issue Android Status Bar )

1 Like

#17

How does this look on your device? I use builtin for Android too now.

1 Like

#18

Looks good! But it does get cut off (left edge).

0 Likes

#19

Looking at the AndroidManifest.xml, maybe there is something obviously different in the games which are different. The Holedown one you linked seems to be a Unity game.

Could try experimenting adding some lines from https://raw.githubusercontent.com/Heyzap/unity-example-app/master/Assets/Plugins/Android/AndroidManifest.xml and see if anything makes a difference too. Maybe the supports-screens tags matters?

<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
android:isGame="true"

I wonder what this does?

https://developer.android.com/guide/topics/manifest/application-element.html#isGame

Both of these might not actually matter though. :slight_smile:

0 Likes

#20

Great! Here is a temporary(?) solution:
customstyle.zip (6.1 KB)
Instruction:

  1. Download this (fake)NE and put it into your project folder
    2.1 If you use default AndroidManifest.xml then replace it in game.project with manifest from the folder.
    2.2 If you have custom AndroidManifest.xml then find this line
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

in activity block, and replace with

android:theme="@style/DefoldActivityTheme"

I’ll talk with @britzl and maybe we implement this or another solution in the engine.

A few links with useful materials:

https://source.android.com/devices/tech/display/display-cutouts#requirements

https://developer.android.com/guide/topics/display-cutout

4 Likes

Android Status Bar / Fullscreen on devices with notch (SOLVED)
Is it possible to do fullscreen on devices like the Nexus 9? (DEF-1129) (SOLVED)
Fullscreen on mobile (SOLVED)