Highlighted

Android phones with a notch: fullscreen starts below the notch so bottom part is cut off

Explorer ,
Nov 30, 2018

Copy link to clipboard

Copied

I have reports and screens from users with Android phones with a notch like the Pixel 3 XL, that my apps are no longer fullscreen: there is a black bar on top, the screen starts below the notch, so the bottom part is cut off.

See this example:

Screenshot_20181120-191302.png

How can I solve this? Preferably without using an ANE.

I'm using AIR29 and <fullScreen>true</fullScreen>. Or is this just a question of migrating to the last AIR version?

TOPICS
Performance issues

Views

2.9K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Android phones with a notch: fullscreen starts below the notch so bottom part is cut off

Explorer ,
Nov 30, 2018

Copy link to clipboard

Copied

I have reports and screens from users with Android phones with a notch like the Pixel 3 XL, that my apps are no longer fullscreen: there is a black bar on top, the screen starts below the notch, so the bottom part is cut off.

See this example:

Screenshot_20181120-191302.png

How can I solve this? Preferably without using an ANE.

I'm using AIR29 and <fullScreen>true</fullScreen>. Or is this just a question of migrating to the last AIR version?

TOPICS
Performance issues

Views

2.9K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 30, 2018 0
Explorer ,
Nov 30, 2018

Copy link to clipboard

Copied

I have just tried using AIR31 but the problem stays the same.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 30, 2018 0
Engaged ,
Dec 05, 2018

Copy link to clipboard

Copied

For your app XML file, are you using a "max_aspect" tag to allow for the extra-tall devices like this?  We had similar issues with devices that were larger than 16:9, and that tag usually fixes the nudging and black bars we were getting.  Here's how ours is set up, within the "android" section of the XML file:

<android>

     <manifestAdditions>

          <![CDATA[

               <manifest android:installLocation="auto">

                   

                    <!-- other tags here -->

                    <application android:hardwareAccelerated="true">

                              <!-- this lets you support devices larger than 16:9 ratio -->

                              <meta-data android:name="android.max_aspect" android:value="2.16" />

                    </application>

               </manifest>

          ]]>

     </manifestAdditions>

</android>

Different values work as well, but you'd need at least 2.06 for the Pixel 3 XL's ratio of 18.5:9.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 05, 2018 6
Explorer ,
Dec 07, 2018

Copy link to clipboard

Copied

Thanks for the answer Flipline! I was using the max_aspect but with a 2.0 valiue. This has always worked before, but seems like it is now indeed causing the incorrect letterboxing and bottom part cut off problem on recent models.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 07, 2018 0
Explorer ,
Dec 14, 2018

Copy link to clipboard

Copied

Flipline, have you tested this recently on a Pixel 3 XL? Or does it work with a certain AIR version, or maybe I am missing some settings.

Because the solution is ok now for me on devices like the Samsung S9, but the Pixel 3 XL keeps showing the black bar and the bottom of the screen is cut off.

I got a report from someone with the device, and I also tested it myself on an online testing service that uses real devices.

I really don't know how to solve this on this particular device...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 14, 2018 0
Explorer ,
Dec 14, 2018

Copy link to clipboard

Copied

After a suggestion from someone on the Starling forum, I have solved the problem now on the Pixel 3 XL as well: just by waiting for 2 seconds to do any stage setup after being added to the stage.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 14, 2018 1
Enthusiast ,
Dec 14, 2018

Copy link to clipboard

Copied

Are you also using Event.RENDER in the beginning? If not I wonder if that would be sufficient, rather than waiting two seconds.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 14, 2018 0
Engaged ,
Dec 14, 2018

Copy link to clipboard

Copied

Hmm we haven't tried on a 3 XL device ourselves to test it, the last one we checked was a Pixel 2 XL and we didn't have any problems there, though it's not quite as wide as a 3 XL...

We usually listen for an Event.RESIZE, and run our adjust-for-resolution code each time that happens -- on some older Android tablets and Kindle Fires that would fire a handful of times at startup with different values than what it had at launch.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 14, 2018 0
Explorer ,
Dec 14, 2018

Copy link to clipboard

Copied

Well the solution is not 100% yet: if I wait 2 seconds, the screen is fullscreen without cut off but there are transparent system bars on top and bottom that stay there...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 14, 2018 0
Explorer ,
Dec 17, 2018

Copy link to clipboard

Copied

I have created a new thread specifically for the Pixel 3 XL because none of the suggested solutions works for this device.

In one of comments above I thought I found a solution, but I had mistakenly used

stage.displayState = StageDisplayState.NORMAL;

which does not have the cut off problem, but keeps showing the system bars on top of the stage.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 17, 2018 0
New Here ,
Apr 10, 2019

Copy link to clipboard

Copied

I think you would need to manually confirm that your app supports "cutouts" for the notch. Have not implemented this myself but it should be the cause of your black bar:

Support display cutouts  |  Android Developers

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 10, 2019 0