# Command-line arguments on Android

**URL:** <https://forums.unrealengine.com/t/command-line-arguments-on-android/380250>\
**Category:** Blueprint\
**Tags:** command-line-argumen, unreal-engine, Android, Blueprint, question, CPP\
**Created:** [December 27, 2016, 12:17am UTC](https://forums.unrealengine.com/t/command-line-arguments-on-android/380250 "2016-12-27T00:17:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_f019b5ab](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f019b5ab](https://forums.unrealengine.com/u/anonymous_user_f019b5ab)\
**Post date:** [December 27, 2016, 12:17am UTC](https://forums.unrealengine.com/t/command-line-arguments-on-android/380250/1 "2016-12-27T00:17:49Z")

</div>

I know, this is not possible by [architecture design of Android](http://stackoverflow.com/a/20197809), but how can we implement some specific command-line arguments, like I am in a huge interest of calling “[SpectatorOnly=1](https://docs.unrealengine.com/latest/INT/Programming/Basics/CommandLineArguments/#generaloptions)” by using blueprints, CPP or even .ini with my Android app on startup.

Also, I may have fallen in a typical “XY problem”, so there is might be an another way for running the app in a spectator only mode.

Thanks!

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [December 27, 2016, 3:04am UTC](https://forums.unrealengine.com/t/command-line-arguments-on-android/380250/2 "2016-12-27T03:04:20Z")

</div>

Search in engine source code then

[https://github.com/EpicGames/UnrealEngine/blob/55c9f3ba0010e2e483d49a4cd378f36a46601fad/Engine/Source/Runtime/Engine/Private/GameModeBase.cpp#L698](https://github.com/EpicGames/UnrealEngine/blob/55c9f3ba0010e2e483d49a4cd378f36a46601fad/Engine/Source/Runtime/Engine/Private/GameModeBase.cpp#L698)

InitNewPlayer is virtual so you can override it

---

<div class="post-metadata">

**Author:** ![Max\_Pixel\_FFL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Max\_Pixel\_FFL](https://forums.unrealengine.com/u/Max_Pixel_FFL)\
**Post date:** [July 19, 2019, 11:42pm UTC](https://forums.unrealengine.com/t/command-line-arguments-on-android/380250/3 "2019-07-19T23:42:59Z")

</div>

What does overriding InitNewPlayer have to do with command-line arguments on Android?
