[Solved] Black bars above and below Cordova app on devices with tall screens

  • I’ve packaged my app using Cordova, and it mostly works great. However, since my device is a galaxy s8 it has an unusual aspect ratio (18.5:9), which means I’ve got black bars above and below my app. Is there a way to make the app scale to fill the screen? I know most Android apps are able to scale up to fill that extra screen height, but I’m not sure how to do it in Cordova. The other issue I’m having is that Cordova thinks my app is a game for some reason, as you can see it gives Samsung Game Tools in the bottom left and right corners. These only show up on games. Is there a setting somewhere to fix these issues?

    alt text

  • This question may find better answers in the cordova forum 🙂

  • yup, I realized that after.

    I actually did figure it out, if anyone is interested. YOu need to add this to your config.xml file:

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

Log in to reply