# Android multiplayer wlan: Android as host device problem

**URL:** <https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848>\
**Category:** Mobile\
**Tags:** unreal-engine, Android\
**Created:** [November 30, 2015, 7:45pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848 "2015-11-30T19:45:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![aussieburger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aussieburger](https://forums.unrealengine.com/u/aussieburger)\
**Post date:** [November 30, 2015, 7:45pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/1 "2015-11-30T19:45:07Z")

</div>

I’m having big troubles getting android as the host working.

I’m testing with the \*\*Multiplayer Shootout \*\*to ensure it’s easy to reproduce with 4.10. The only thing I changed in that project was changing the OnlineSubSystem in the DefaultEngine.ini like so:

```auto

[OnlineSubsystem]
DefaultPlatformService=Null

```

**What works** :

- Windows as host android as client

**What doesn’t work** :

- Android as host windows as client
- Android as host different android device as client

Log on android device as I start it as the host (“Create Session”):

```auto

11-30 19:59:30.256: D/UE4(24913): [2015.11.30-18.59.30:263][64000]LogInit: BSD: I am localhost (127.0.0.1:0)
11-30 19:59:30.391: D/UE4(24913): [2015.11.30-18.59.30:398][64000]LogPackageName: SearchForPackageOnDisk took 0.129s to resolve Level_01.umap.
11-30 19:59:30.491: D/UE4(24913): [2015.11.30-18.59.30:498][64000]LogPackageName: SearchForPackageOnDisk took 0.087s to resolve Level_01.umap.
11-30 19:59:30.491: D/UE4(24913): [2015.11.30-18.59.30:499][64000]LogNet: Browse: /Game/Maps/Level_01?listen
11-30 19:59:30.496: D/UE4(24913): [2015.11.30-18.59.30:499][64000]LogLoad: LoadMap: /Game/Maps/Level_01?listen
11-30 19:59:30.541: D/UE4(24913): [2015.11.30-18.59.30:546][64000]LogParticles: Destroying 0 GPU particle simulations for FXSystem 0x0x96a62390
11-30 19:59:31.041: D/UE4(24913): [2015.11.30-18.59.31:047][64000]LogAIModule: Creating AISystem for world Level_01
11-30 19:59:31.046: D/UE4(24913): [2015.11.30-18.59.31:050][64000]LogWorld: Game class is 'MyGameMode_C'
11-30 19:59:31.051: D/UE4(24913): [2015.11.30-18.59.31:056][64000]LogInit: BSD: Socket queue 262144 / 262144
11-30 19:59:31.051: D/UE4(24913): [2015.11.30-18.59.31:058][64000]LogNet: GameNetDriver IpNetDriver_0 IpNetDriver listening on port 7777
11-30 19:59:31.086: D/UE4(24913): [2015.11.30-18.59.31:092][64000]LogWorld: Bringing World /Game/Maps/Level_01.Level_01 up for play (max tick rate 0) at 2015.11.30-19.59.31
11-30 19:59:31.091: D/UE4(24913): [2015.11.30-18.59.31:095][64000]LogWorld: Bringing up level for play took: 0.019772
11-30 19:59:31.126: D/UE4(24913): [2015.11.30-18.59.31:132][64000]LogScript:Warning: Accessed None 'CallFunc_K2_GetPawn_ReturnValue'
11-30 19:59:31.126: D/UE4(24913): MyGameMode_C /Game/Maps/Level_01.Level_01:PersistentLevel.MyGameMode_C_0
11-30 19:59:31.126: D/UE4(24913): Function /Game/Blueprints/MyGameMode.MyGameMode_C:ExecuteUbergraph_MyGameMode:045F
11-30 19:59:31.151: D/UE4(24913): [2015.11.30-18.59.31:158][64000]LogOnline:Warning: NULL: Can't start an online session (Game) in state InProgress
11-30 19:59:31.161: D/UE4(24913): [2015.11.30-18.59.31:167][64000]LogScript:Warning: Accessed None 'Widget'
11-30 19:59:31.161: D/UE4(24913): MyGameInstance_C /Engine/Transient.GameEngine_0:MyGameInstance_C_0
11-30 19:59:31.161: D/UE4(24913): Function /Game/Blueprints/MyGameInstance.MyGameInstance_C:Hide Widget:000A

```

Similar to the problem mentioned here without resolve: [Local Wifi Multiplayer without using Google Play? - Mobile - Unreal Engine Forums](https://forums.unrealengine.com/showthread.php?69417-Local-Wifi-Multiplayer-without-using-Google-Play)  
and here also without resolve: [Android host - Multiplayer & Networking - Unreal Engine Forums](https://answers.unrealengine.com/questions/301315/android-host.html)

I have not been able to find anywhere how to get android as the host working. The end result I’m trying to achieve is android to android connection for a mutliplayer game over a local wifi both devices are connected to.

Also created an Answerhub ticket: [https://answers.unrealengine.com/questions/341008/android-as-host-not-working.html](https://answers.unrealengine.com/questions/341008/android-as-host-not-working.html)

Any help appreciated!

---

<div class="post-metadata">

**Author:** ![aussieburger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aussieburger](https://forums.unrealengine.com/u/aussieburger)\
**Post date:** [December 1, 2015, 7:36pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/2 "2015-12-01T19:36:47Z")

</div>

Ok I managed to get it working! By connecting via console commands with “open ipaddressOfMyAndroidDevice” instead of the blueprint node “Join Session”

So this appears to be a bug with the “Blueprint Session Result” variable not giving/getting the correct IP of the android host?

Is there anyway to get the server IP address in the client? Currently it seems like it only supports Server Name ☹

---

<div class="post-metadata">

**Author:** ![mhnoni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mhnoni](https://forums.unrealengine.com/u/mhnoni)\
**Post date:** [December 25, 2015, 8:30am UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/3 "2015-12-25T08:30:34Z")

</div>

@ unreal team , any help or tips guys ?

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [December 26, 2015, 11:00am UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/4 "2015-12-26T11:00:40Z")

</div>

The last few entries in the log explain some of what’s going on.

```auto

11-30 19:59:31.126: D/UE4(24913): [2015.11.30-18.59.31:132][64000]LogScript:Warning: Accessed None 'CallFunc_K2_GetPawn_ReturnValue'
11-30 19:59:31.151: D/UE4(24913): [2015.11.30-18.59.31:158][64000]LogOnline:Warning: NULL: Can't start an online session (Game) in state InProgress
11-30 19:59:31.161: D/UE4(24913): [2015.11.30-18.59.31:167][64000]LogScript:Warning: Accessed None 'Widget'
11-30 19:59:31.161: D/UE4(24913): MyGameInstance_C /Engine/Transient.GameEngine_0:MyGameInstance_C_0
11-30 19:59:31.161: D/UE4(24913): Function /Game/Blueprints/MyGameInstance.MyGameInstance_C:Hide Widget:000A

```

First line indicates that it can’t find the pawn for something. I suggest testing Multiplayer in PIE and making sure that ‘Break Blueprints On Exceptions’ is turned on in editor/project settings so you can fix it.

Second line indicates that you’re trying to start a Game Session while the GameModes Match State is ‘InProgress’ - which it says you can’t do. It seems as though Gameplay has already started before you start the Online Session, or you already have an online session in progress.

Third/Fourth/Fifth line indicates that the game can’t find a ‘Widget’ to remove in the Game Instance.

I would suggest fixing these errors and trying again after that. I’ve found that Android doesn’t seem to handle errors as gracefully as Windows does, especially when it comes to Multiplayer. The slightest misdemeanor seems to cause problems. We never tried an Android host for PC client, but all other configurations worked for us without a hitch when we did Cross-Platform multiplayer - so it definitely works. Always check both the Client and the Server logs too.

---

<div class="post-metadata">

**Author:** ![aussieburger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aussieburger](https://forums.unrealengine.com/u/aussieburger)\
**Post date:** [December 26, 2015, 7:07pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/5 "2015-12-26T19:07:33Z")

</div>

FYI: I managed to get it working using the pull request from psychogony as mentioned here: [https://answers.unrealengine.com/questions/341008/android-as-host-not-working.html](https://answers.unrealengine.com/questions/341008/android-as-host-not-working.html)

It can be found here: [https://github.com/EpicGames/UnrealEngine/pull/1820](https://github.com/EpicGames/UnrealEngine/pull/1820)  
he shouldn’t mind me posting it here, but be aware it was tricky (for me at least) to cherry pick this one - but once I got it all compiled the join session blueprint node works flawlessly for me on both normal android app and two gearvr devices 🙂

So yeah it’s definitely a bug in the engine with android and multiplayer that is not working by default unless you enter the IP directly but at least I have a workaround for now - it’s just annoying there are so many gearvr workarounds needed to be manually compiled every time a new UE4 version comes out…

---

<div class="post-metadata">

**Author:** ![mhnoni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mhnoni](https://forums.unrealengine.com/u/mhnoni)\
**Post date:** [December 27, 2015, 5:04pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/6 "2015-12-27T17:04:22Z")

</div>

Thanks TheJamsh

Thank aussieburger  
But to be honest i couldn’t figure out how did you fix your problem from that Github page ☹ did you copy past the files to your project ? iam not a programmed and if you have tips what change you made in your game in detail i will be very thankful as i’m noob here and my knowledge only restricted in blueprint .

---

<div class="post-metadata">

**Author:** ![aussieburger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aussieburger](https://forums.unrealengine.com/u/aussieburger)\
**Post date:** [January 4, 2016, 8:07pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/7 "2016-01-04T20:07:35Z")

</div>

Here’s a brief step-by-step for how I got it working. PS: I’m not a C++ programmer either and while the end result of these steps is it all works via blueprints, you do need to mess around with visual studio unfortunately:

1. link your unreal and github account as per: [Unreal Engine 4 on GitHub - Unreal Engine](https://www.unrealengine.com/ue4-on-github)
2. download the zip source code of the engine: [https://github.com/EpicGames/UnrealEngine/tree/4.10](https://github.com/EpicGames/UnrealEngine/tree/4.10)
3. have Visual Studio express installed
4. exact zip and run setup (will take ages)
5. run GenerateProjectFiles.bat as admin
6. open UE4.sln which will open UE4 source in Visual Studio
7. Build windows 64 | Development Editor (will take ages)
8. replace the **two whole files** from the pull request: [https://github.com/EpicGames/UnrealEngine/pull/1820/files](https://github.com/EpicGames/UnrealEngine/pull/1820/files)
9. Build Android | Development (will take ages)
10. Build Android | Shipping (will take ages)
11. Now you can open your freshly built engine with the fix in place. Located: \Engine\Binaries\Win64\UE4Editor.exe (it will take absolutely ages the first time you open and do anything)

For all that building stuff you can find documentation from Epic games on how to do it on this link: [https://github.com/EpicGames/UnrealEngine/tree/4.10](https://github.com/EpicGames/UnrealEngine/tree/4.10)

I actually used branch 4.9 however all branches should work in theory

Annoying we need to do this - hope Epic can give feedback on putting the fix in for all! 🙂

---

<div class="post-metadata">

**Author:** ![mhnoni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mhnoni](https://forums.unrealengine.com/u/mhnoni)\
**Post date:** [January 7, 2016, 6:49am UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/8 "2016-01-07T06:49:50Z")

</div>

@ aussieburger thanks a lot man really appreciated , i will try to do your steps and hopefully unreal team can fix the issue .thanks to you i will get back to my lan android game project i was working on it that i left it due to this issue .

---

<div class="post-metadata">

**Author:** ![mhnoni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mhnoni](https://forums.unrealengine.com/u/mhnoni)\
**Post date:** [January 15, 2016, 6:07pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/9 "2016-01-15T18:07:00Z")

</div>

Hi

i just downloaded both the file required to be replaced but anyone can tell me pls why do i need to download the source code of the engine to do that ? as i already found and i can replace the 2 files in the engine itself that i download it from the epic launcher.

I’m in 4.8 Btw does this issue still in 4.10 ?

---

<div class="post-metadata">

**Author:** ![mhnoni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mhnoni](https://forums.unrealengine.com/u/mhnoni)\
**Post date:** [January 18, 2016, 5:04pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/10 "2016-01-18T17:04:14Z")

</div>

OK to close this thread thanks to aussieburger and psychogony fix . android now can act as server and the other phone can find the session when 2 phone connected to a local wifi router but just to be informed that the join fail when you make portable hotspot one of the phone or direct wifi to make a wifi network between the 2 phone so hope Epic can fix this issue .

---

<div class="post-metadata">

**Author:** ![Pabooklas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pabooklas](https://forums.unrealengine.com/u/Pabooklas)\
**Post date:** [February 14, 2016, 11:39am UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/11 "2016-02-14T11:39:04Z")

</div>

> [@aussieburger;447622](#):
>
> Here’s a brief step-by-step for how I got it working. PS: I’m not a C++ programmer either and while the end result of these steps is it all works via blueprints, you do need to mess around with visual studio unfortunately:
> 
> 1. link your unreal and github account as per: [Unreal Engine on GitHub](https://www.unrealengine.com/ue4-on-github)
> 2. download the zip source code of the engine: [https://github.com/EpicGames/UnrealEngine/tree/4.10](https://github.com/EpicGames/UnrealEngine/tree/4.10)
> 3. have Visual Studio express installed
> 4. exact zip and run setup (will take ages)
> 5. run GenerateProjectFiles.bat as admin
> 6. open UE4.sln which will open UE4 source in Visual Studio
> 7. Build windows 64 | Development Editor (will take ages)
> 8. replace the **two whole files** from the pull request: [https://github.com/EpicGames/UnrealEngine/pull/1820/files](https://github.com/EpicGames/UnrealEngine/pull/1820/files)
> 9. Build Android | Development (will take ages)
> 10. Build Android | Shipping (will take ages)
> 11. Now you can open your freshly built engine with the fix in place. Located: \Engine\Binaries\Win64\UE4Editor.exe (it will take absolutely ages the first time you open and do anything)
> 
> For all that building stuff you can find documentation from Epic games on how to do it on this link: [https://github.com/EpicGames/UnrealEngine/tree/4.10](https://github.com/EpicGames/UnrealEngine/tree/4.10)
> 
> I actually used branch 4.9 however all branches should work in theory
> 
> Annoying we need to do this - hope Epic can give feedback on putting the fix in for all! 🙂

Does anyone know if this is still needed in 4.11?

---

<div class="post-metadata">

**Author:** ![mhnoni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mhnoni](https://forums.unrealengine.com/u/mhnoni)\
**Post date:** [February 15, 2016, 3:03pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/12 "2016-02-15T15:03:38Z")

</div>

> [@Pabooklas;473547](#):
>
> Does anyone know if this is still needed in 4.11?

Yes i think as android still not supported .

---

<div class="post-metadata">

**Author:** ![Pabooklas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pabooklas](https://forums.unrealengine.com/u/Pabooklas)\
**Post date:** [February 15, 2016, 5:05pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/13 "2016-02-15T17:05:51Z")

</div>

Thanks for a reply. Time to download Visual Studio I guess.

---

<div class="post-metadata">

**Author:** ![KillerSneak](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/killersneak/32/754802_2.png) [@KillerSneak](https://forums.unrealengine.com/u/KillerSneak)\
**Post date:** [May 21, 2016, 8:20am UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/14 "2016-05-21T08:20:08Z")

</div>

So I have been away for quite some time but does it work now? Is it possible to make multiplayer work with Android?

---

<div class="post-metadata">

**Author:** ![mhnoni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mhnoni](https://forums.unrealengine.com/u/mhnoni)\
**Post date:** [June 2, 2016, 7:57pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/15 "2016-06-02T19:57:00Z")

</div>

> [@KillerSneak;533805](#):
>
> So I have been away for quite some time but does it work now? Is it possible to make multiplayer work with Android?

it will be with 4.12

---

<div class="post-metadata">

**Author:** ![motorsep](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/motorsep/32/918698_2.png) [@motorsep](https://forums.unrealengine.com/u/motorsep)\
**Post date:** [June 2, 2016, 8:59pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/16 "2016-06-02T20:59:27Z")

</div>

4.12 is out now. Has anyone tested this yet?

---

<div class="post-metadata">

**Author:** ![Pabooklas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pabooklas](https://forums.unrealengine.com/u/Pabooklas)\
**Post date:** [June 3, 2016, 7:46pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/17 "2016-06-03T19:46:28Z")

</div>

I just tested with two phones and also android server with pc trying to join. Everything works.

---

<div class="post-metadata">

**Author:** ![motorsep](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/motorsep/32/918698_2.png) [@motorsep](https://forums.unrealengine.com/u/motorsep)\
**Post date:** [June 3, 2016, 7:57pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/18 "2016-06-03T19:57:20Z")

</div>

+1 @Pabooklas !

Now I just need a good tutorial series about MP on PC/Android using BP only and I am good to go :o

---

<div class="post-metadata">

**Author:** ![Pabooklas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pabooklas](https://forums.unrealengine.com/u/Pabooklas)\
**Post date:** [June 3, 2016, 8:25pm UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/19 "2016-06-03T20:25:08Z")

</div>

There are many tutorials how to do it for pc on youtube. For android it’s exactly the same. So follow one of them on YouTube. Then just hook your create, find and join events to umg buttons or even android buttons for testing.

Also edit the defaultengine.in file like the op wrote.

Good luck!

---

<div class="post-metadata">

**Author:** ![TSUEnami](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TSUEnami](https://forums.unrealengine.com/u/TSUEnami)\
**Post date:** [June 4, 2016, 5:06am UTC](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848/20 "2016-06-04T05:06:30Z")

</div>

Wow! I can’t believe this I was actually able to get this to work. It sounds like a giant blind alley at first (took me probably around 3 hours), but it worked! This has to be the best instructions/boldest workaround I have ever seen. hahaha Thank you so much for the clear steps and wisdom. I was lost without this. You guys rock!

I wish I had more to contribute. let’s see. umm, I did this on 4.11. Oh there was one other hiccup. in the README.md (be sure to read it!) that comes with the [https://github.com/EpicGames/UnrealEngine/tree/4.10](https://github.com/EpicGames/UnrealEngine/tree/4.10) download it says, “Be sure to include C++ support as part of the install, which is disabled by default.” Here is a link on how to do that. [Adding C++ support to Visual Studio Community 2015 - YouTube](https://www.youtube.com/watch?v=U1MRUiJAOq0)

Thanks again, guys I can’t tell you how relieved I am.

[Next page](https://forums.unrealengine.com/t/android-multiplayer-wlan-android-as-host-device-problem/48848.md?page=2)
