# How to make fullscreen with code on android ? (for FullScreen Immersive Button not supported phones)

**URL:** <https://forums.unrealengine.com/t/how-to-make-fullscreen-with-code-on-android-for-fullscreen-immersive-button-not-supported-phones/432618>\
**Category:** Community & Industry Discussion\
**Tags:** unreal-engine, Android, bug-report, fullscreen, question\
**Created:** [August 28, 2018, 8:37am UTC](https://forums.unrealengine.com/t/how-to-make-fullscreen-with-code-on-android-for-fullscreen-immersive-button-not-supported-phones/432618 "2018-08-28T08:37:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eydi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eydi](https://forums.unrealengine.com/u/Eydi)\
**Post date:** [August 28, 2018, 8:37am UTC](https://forums.unrealengine.com/t/how-to-make-fullscreen-with-code-on-android-for-fullscreen-immersive-button-not-supported-phones/432618/1 "2018-08-28T08:37:11Z")

</div>

Hello everyone, I made a little platform 2D game and I bought some mistakes about it. I’m using version 4.18.3.  
It is not active when I activate the “Fullscreen immersive” button. My phone is Vestel Venus V4 (android 7.0) and of course not on the supported phones list. ([if you want to check list click here][1])  
I think I can fix it manually by writing code but I don’t know which files I need to organize.

**- How do I change which java files in the project?**

Thanks in advance for answers.

![251784-bug-immersive.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/d/67dcde70dd7d7d7f9a6c034212068506bcb4c6d9.png)

 ![251785-screenshot-20180828-110138.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/2/502cd5cd5d2cf3bae9eecdb5f5c88c497e018b90.png)

So there is another problem.  
The problem is that I can not edit the splash screen.

![251787-launch-problem.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/a/1/aa16157a211614762c113e69c618225d8faea70e.png)

 ![251786-screenshot-20180828-110118.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/9/c49a03fe348ebcf1353b9d72453e7ab318744d3d.png)

---

<div class="post-metadata">

**Author:** ![MrMcKvarz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MrMcKvarz](https://forums.unrealengine.com/u/MrMcKvarz)\
**Post date:** [August 28, 2018, 3:51pm UTC](https://forums.unrealengine.com/t/how-to-make-fullscreen-with-code-on-android-for-fullscreen-immersive-button-not-supported-phones/432618/2 "2018-08-28T15:51:19Z")

</div>

Hi, I had an activity I wanted to be fullscreen, I’ve put the following code in the activity onCreate method:

```
				getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);

```

You can do it in your game activity if don’t need another one.  
As for the splash screen, check what image do you have in Build/Android/res folder, if it is wrong, then delete folder Build completely.

---

<div class="post-metadata">

**Author:** ![Eydi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eydi](https://forums.unrealengine.com/u/Eydi)\
**Post date:** [August 28, 2018, 7:27pm UTC](https://forums.unrealengine.com/t/how-to-make-fullscreen-with-code-on-android-for-fullscreen-immersive-button-not-supported-phones/432618/3 "2018-08-28T19:27:08Z")

</div>

I tried what you said but when I launch to device, I checked the ue4 code and ue4 deletes the code. this location – \>…\Intermediate\Android\APK\src\com\epicgames\ue4\GameActivity.java  
I think I need to get the apk output android studio but it doesn’t make sense for me to do it again for every bug.

For the second problem, I did what you said and I checked. I need to write SplashScreen in java with SplashScreen.java file for the solution. I didn’t own my phone when I deleted and reloaded the Build file.

**-Is there a way I can do the splash screen with a widget? It would be better for me.**

---

<div class="post-metadata">

**Author:** ![MrMcKvarz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MrMcKvarz](https://forums.unrealengine.com/u/MrMcKvarz)\
**Post date:** [August 29, 2018, 8:56am UTC](https://forums.unrealengine.com/t/how-to-make-fullscreen-with-code-on-android-for-fullscreen-immersive-button-not-supported-phones/432618/4 "2018-08-29T08:56:06Z")

</div>

You can’t modify those files directly since they are modified each time you build your game. You need to use a combination of ubt and apl. In your game.build.cs you need to add apl file like this:

```
        if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PrivateDependencyModuleNames.AddRange(new string[] { "Launch" });
            AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(ModuleDirectory, "YourName_APL.xml"));
        }

```

create an file with that name and apl extension and make it look like this:

```
<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.YourCompany.YourPackage">

	<init>
		<log text="APLr init"/>
	</init>
<gameActivityOnCreateAdditions>
     <insert>
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                 WindowManager.LayoutParams.FLAG_FULLSCREEN);
     </insert>
   </gameActivityOnCreateAdditions>

```

This way this code will be always inserted into GameActivity.java in OnCreate() method.

---

<div class="post-metadata">

**Author:** ![Eydi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eydi](https://forums.unrealengine.com/u/Eydi)\
**Post date:** [August 30, 2018, 2:32pm UTC](https://forums.unrealengine.com/t/how-to-make-fullscreen-with-code-on-android-for-fullscreen-immersive-button-not-supported-phones/432618/5 "2018-08-30T14:32:26Z")

</div>

I apologize for the late reply, I was ill.I created the project with blueprint. So I couldn’t find the build.cs file.I made an arrangement like the one pictured below, but I didn’t achieve it.

 ![252052-additions.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/a/9/9a9a52f41af7593dfd6dd2428c63ccb6ba7a4485.png)

---

<div class="post-metadata">

**Author:** ![MrMcKvarz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MrMcKvarz](https://forums.unrealengine.com/u/MrMcKvarz)\
**Post date:** [August 31, 2018, 7:28am UTC](https://forums.unrealengine.com/t/how-to-make-fullscreen-with-code-on-android-for-fullscreen-immersive-button-not-supported-phones/432618/6 "2018-08-31T07:28:40Z")

</div>

This is a modification to manifest file, but you need to modify GameActivity.java. I believe this can only be done using the source code.

---

<div class="post-metadata">

**Author:** ![SolSkyre](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SolSkyre](https://forums.unrealengine.com/u/SolSkyre)\
**Post date:** [December 13, 2020, 8:31pm UTC](https://forums.unrealengine.com/t/how-to-make-fullscreen-with-code-on-android-for-fullscreen-immersive-button-not-supported-phones/432618/7 "2020-12-13T20:31:13Z")

</div>

There is a setting to force the app to go fullscreen. Search for the entry “Maximum supported aspect ratio” and set it to 2.4.
