Search code examples
javaandroidfullscreenscalingsamsung-mobile

Optimize app for full screen on Samsung S8


After testing my app on a range of devices, I have noticed on large devices such as the Samsung S8, the app does not scale fully to the edges of the screen.

After some research, I could make my app stretch all the way by editing a setting on the phone.

However, it warns me that my app might not work as it is not optimized for the size. My app works fine, however. How do optimize my app so phones such as the Samsung Galaxy will run my app full screen on default?

I have already made the app run with the menu buttons and status bar hidden with the help of a similar issue here.


Solution

  • Quoting this answer:

    In the <application> tag of your app manifest, add the following meta-data:

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

    By doing so, you tell the android system that this app is designed to support maximum aspect ratio of 18.5:9 (approx. and that by the way is the aspect ratio of S8).

    This worked for me, and removed my app (and thus the warning) from the list in the display settings menu.