mesmotronic / cordova-plugin-fullscreen

Plugin for Cordova (PhoneGap) to enable Android's various full screen modes
BSD 3-Clause "New" or "Revised" License
168 stars 56 forks source link

Borderless/notch devices doesn't display a fully fullscreen mode #38

Closed Faksprod closed 5 years ago

Faksprod commented 5 years ago

Hello, thanks for this plugin. I'm not sure where I should open this issue so I first try here. (Should I ask this question on Cordova Github or Cordova Android Github?)

Infos:

Problem: The fullscreen mode doesn't works on new very wide and borderless devices such as Samsung Galaxy s10, Google Pixel 3XL or OnePlus 6T. As you can see on the attached file, the app is disturbed/displaced from the top which is displaying a black area.

android-bordeless-fullscreen-ultrawide

What should be expected: The app webview should be displayed correctly, 100% fullscreen, without that black area.

Temporary fix: I found some help on StackOverflow about how to fix this issue. It's a bit tricky. But this solution isn't clean enough, it solves the fullscreen problem but causes other problems such as (see attached file):

android-theme-full

Anyone with same problem? Any advises to give about how to use 100% fullscreen on borderless devices? Thanks!

neilrackett commented 5 years ago

Have you tried setting the max_aspectvalue in the section of your manifest? e.g.

<meta-data android:name="android.max_aspect" android:value="2.16" />
Faksprod commented 5 years ago

Thanks for your help. In my config.xml file I tried:

<config-file parent="./application" target="AndroidManifest.xml">
   <!-- <meta-data android:name="android.max_aspect" android:value="5.0" /> -->
   <meta-data android:name="android.max_aspect" android:value="2.16" />
</config-file>

It doesn't works. The Splaschreen still doesn't take the full screen. There is a white area on the left side of the screen (and my PNG is much larger than the screen)

Capture d’écran 2019-09-24 à 15 38 09.

neilrackett commented 5 years ago

Try this:

<config-file parent="/manifest/application" target="AndroidManifest.xml">
    <meta-data android:name="android.max_aspect" android:value="2.16" />
</config-file>

I've closed this issue because, from your description, it appears to be a wider Cordova issue rather than a plugin issue.

Faksprod commented 5 years ago

Doesn't works either. Ok, I'm going to open an issue on the Cordova Github. Thanks for your time.