Notched devices?

Are there any ways to let the app go to truly full screen on Android notched devices? I used immersive-mode extension but app did not show the content below the notched area, we have the black space there. Thanks!
display_layout_fullscreen_cutout_never

    <meta-data android:name="android.max_aspect" android:value="2.5" />
    <config:android minimum-sdk-version="19" target-sdk-version="28" />
    <haxelib name="extension-android-immersive"/>
    <set name="IMMERSIVE_FULL"/>

    <window width="0" height="0" orientation="portrait" fps="60" 
resizable="true" vsync="false" fullscreen="true" antialiasing="0" if="cpp"/>


#if mobile    
  AndroidImmersive.setImmersive();
#end

We rely upon SDL for initializing our window

Perhaps support will be released in the next version? We are on the latest stable 2.0.10 version but there are often improvements going into the development version:

http://hg.libsdl.org/SDL/shortlog

Sometimes we can cherry pick from the dev version here or we can update entirely to a dev version for Lime

1 Like

You probably need to add android.max_aspect metadata to your manifest as explained here https://android-developers.googleblog.com/2017/03/update-your-app-to-take-advantage-of.html

Thanks. it’s a must-have to support wide screen devices. The first tag is in my android manifest :slight_smile:

Should this be in our template by default?

Yes, it should be!
Making this and setting android adaptive icon as default are better for newcomers!

Could someone create a pull request with the change?

What does Lime need in order to add adaptive icon support? Would we be able to use our existing icon system or would it require a new icon type in the tools?

I’m not sure about immerse mode, but in order to support adaptive icons some things should be change.

  1. In AndroidManifest.xml the code android:icon="@drawable/icon" should be replaced with android:icon="@mipmap/ic_launcher if our icons start with ic_launcher ( which is default value - ic_launcher.png )
  2. We should set in project.xml <template path="templates" if ="android" /> and create the following structure in our project :
  \templates
   \android
    \template
     \app
      \src
       \main
        \res
         \mipmap-mdpi
         \mipmap-hdpi
         \mipmap-xhdpi
         \mipmap-xxhdpi
         \mipmap-xxxhdpi
         \mipmap-anydpi-v26
         \drawable

Directories drawable and mipmap-anydpi-v26 are not mandatory and depends from the icon type . The easy way to create icons is via Adroid Studio ( Right click on res folder and New > Image Asset ) .
Other way will be to set specific variable in project.xml and in compile time to copy structure to lime\7,6,3\templates\android\template\app\src\main\res\ similiar to AndroidManifest.xml at the moment.
Other way to create icons is from here : https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html
That’s are all requirements for adaptive icons.

1 Like

Hi! My first test on Android 8, the app does not run in true full screen mode but on Android 9 (XiaoMi Real Me) all content is now under the notch without using any immersive-mode extension and this both happen with OpenFL 8.9.x and Adobe Air 32+.

Hopefully, this info can help. Cheers.