Search Issue Tracker

Fixed in 2019.3.X

Fixed in 2018.4.X, 2019.2.X

Votes

0

Found in

2017.4.0f1

2018.4.0f1

2019.3.0a1

Issue ID

1154440

Regression

No

[Android] meta-data element for max aspect ratio configuration is not present in android manifest

Mobile

-

Steps to reproduce:
1. Open "AndroidAspectRatio.zip" in Unity 2017.4
2. Export project and open manifest file

You can see meta-data element is present which is used for Android devices that uses OS 7 and lower
<meta-data android:name="android.max_aspect" android:value="1.86" />

3. Repeat step 2 in 2018.4 version of Unity

Manifest doesn't contain following element anymore:
<meta-data android:name="android.max_aspect" android:value="1.86" />

Instead, it has 'android.maxAspectRatio="1.86"' attribute added to Activity element which is recognised by Android devices that use OS 8 and higher

Actual result: either maxAspectRatio attribute is present in the manifest or meta-data element with a max_aspect property, but not both.
Expected result: both (attribute and meta-data element) should be present in the manifest, especially if the minimum API level is set to below 8.0

Issue: Some Android devices with lower OS than 8.0 will not recognize the new (android.maxAspectRatio="1.86") attribute that is set by 2018.4 resulting in incorrect behaviour.

This is also mentioned in the official documentation:
https://developer.android.google.cn/guide/practices/screens-distribution#MaxAspectRatio

Reproduced on: 2017.4.29f1, 2018.4.3f1, 2019.3.0a8

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.