Android.max_aspect - do we need to do anything to take advantage of the new aspect ratios?


#1

Google put up a notification in the Google Play Developer Console called
"Update your app to take advantage of the larger aspect ratio on new Android flagship devices"

Basically, it’s for the Samsung Galaxy S8 and LG G6.

Do we need to take any action to get that additional screen space or will the framework already take advantage of the space?


#2

Well, it should be fine. If you want to check though go into responsive mode in chrome and make the window wider, see how it looks.


#3

I’m not sure if this is enough. Here it says:

Note: if you don’t set a value, and android:resizeableActivity is not true, then the maximum aspect ratio defaults to 1.86 (roughly 16:9) and your app will not take advantage of the extra screen space.

So maybe Android OS will block the view from using the full space? Maybe we have to add <meta-data android:name="android.max_aspect" android:value="2.1" /> to AndroidManifest.xml?


#4

Interesting, I find that a little surprising, but ya you might be right on that. I wonder if there’s an emulator with this ratio out there? You should be able to at least test in an Android emulator and see?


#5

Thank you both very much. I wish I had a device to test with so i could see.


#6

Hi guys

Just tested this on my Samsung Galaxy S8+
I can confirm we need to take action for the app to become fullscreen otherwise there are black bars on top and bottom of your Ionic app by default.

To fix this add <meta-data android:name="android.max_aspect" android:value="2.1" /> inside the <application> tag in the AndroidManifest.xml file (located in platforms/android).

Rebuild your app and that’s it :smiley:


#7

Great - thank you very much!

Please let us know if there are any unintended side effects.


#8

Just tested on my Samsung Galaxy S8 and our Ionic v1 application: everything works well without specifying android.max_aspect.