# Is it possible to replace GameActivity with a custom Activity? If so, how to do it?

**URL:** <https://forums.unrealengine.com/t/is-it-possible-to-replace-gameactivity-with-a-custom-activity-if-so-how-to-do-it/2419634>\
**Category:** Mobile\
**Tags:** unreal-engine, Android, editor, question, CPP\
**Created:** [March 26, 2025, 7:55pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-replace-gameactivity-with-a-custom-activity-if-so-how-to-do-it/2419634 "2025-03-26T19:55:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VladGrisik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VladGrisik](https://forums.unrealengine.com/u/VladGrisik)\
**Post date:** [March 26, 2025, 7:55pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-replace-gameactivity-with-a-custom-activity-if-so-how-to-do-it/2419634/1 "2025-03-26T19:55:37Z")

</div>

I need a custom Activity to be used in my game on my phone, or I need to know how to extend GameActivity. I tried to replace the default Activity, but it didn’t work. In Build/Android, I created an AndroidManifest.xml:

```auto
<activity 
android:name="com.YourCompany.MobileTest.MainActivity" 
android:exported="true" 
android:label="@string/app_name" 
android:theme="@style/UnrealSplashTheme"| 
android:configChanges="mcc|mnc|uiMode|density|screenSize|smallestScreenSize|screenLayout|orientation|keyboardHidden|keyboard|navigation|touchscreen|locale|fontScale 
ayoutDirection" 
android:resizeableActivity="false" 
android:launchMode="singleTask" 
android:screenOrientation="sensorLandscape" 
android:debuggable="true"> 
<intent-filter> 
<action android:name="android.intent.action. MAIN" /> 
<category android:name="android.intent.category.LAUNCHER" /> 
</intent-filter> 
<meta-data android:name="android.app.lib_name" android:value="Unreal" /> 
</activity>

```

I also added to DefaultEngine.ini:

```auto
[/Script/AndroidRuntimeSettings.AndroidRuntimeSettings] 
StoreVersionOffsetArm64=1 
StoreVersionOffsetX8664=1 
bPackageDatalnsideApk=True 
bDisableVerifyOBBOnsStartUp=True 
bBuildForES31=True 
GameActivityClassName=com.YourCompany.DroneOnMission.MainActivity 
bBuildForX8664=False

```

but when I build a project, I always use \<activity android:name=“com.epicgames.unreal.GameActivity”  
And, by the way, if I call some function from MainActivity from c++, it will be visible and it will work. And I don’t know what to do anymore.

Thanks
