Hi, I started to study the engine and immediately ran into such a headache. The application does not work in full screen mode.
Phone: samsung a40 19.5 / 9
Android: 11
Engine: 4.26.1
Orientation: Landscape
Kitkat + full screen: true
Maximum support aspect ratio: 2.4
Use current display region: true
Camera Maintain Aspect Ratio: false
1 Like
TheDusk
(TheDusk)
May 8, 2021, 1:14pm
2
Guided by [this information][1] added an additional tag to gameactivity - android:maxAspectRatio=“2.4”
Here’s more information on how to do it:
3 Likes
Honorenji
(Honorenji)
June 24, 2023, 9:44am
3
After some digging, I found this setting under Platforms → Android → APK Packaging , there is a setting called Use Display cut-out region? which includes the notch on top of the screen. Seems to be false by default.
Haven’t been able to test this just yet, but felt this might solve both our issues :')
Didi your Problem solve.I am facing the same issue.Use display cutout region is not working.engine version 5.1
Thank you so much! <3 I was searching for that solution for a long time.
1 Like
please help me i do everything that tell above but nothing work in ue4.27.2
nbulavin
(Nikita Bulavin)
December 25, 2024, 7:52pm
9
Hi, this can be fixed in a C++ project. First of all, go to the Source/PROJECT_NAME
folder and create the CustomAndroidManifest.xml
file with the following code inside:
<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
<androidManifestUpdates>
<removePermission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<removePermission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<loopElements tag="activity">
<setStringFromAttribute result="activityName" tag="$" name="android:name"/>
<setBoolIsEqual result="isTargetActivity" arg1="$S(activityName)" arg2="com.epicgames.unreal.GameActivity"/>
<if condition="isTargetActivity">
<true>
<addAttribute tag="$" name="android:maxAspectRatio" value="2.8"/>
</true>
</if>
</loopElements>
</androidManifestUpdates>
</root>
Then go to the PROJECT_NAME.Build.cs
file and add the following code:
if (Target.Platform == UnrealTargetPlatform.Android)
{
var manifestFile = Path.Combine(ModuleDirectory, "CustomAndroidManifest.xml");
AdditionalPropertiesForReceipt.Add("AndroidPlugin", manifestFile);
}
This worked for me in UE 5.5.1