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.
The last few entries in the log explain some of what’s going on.
11-30 19:59:31.126: D/UE4(24913): [2015.11.30-18.59.31:132]LogScript:Warning: Accessed None 'CallFunc_K2_GetPawn_ReturnValue'
11-30 19:59:31.151: D/UE4(24913): [2015.11.30-18.59.31:158]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]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.
It can be found here: 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…
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 .
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:
@ 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 .
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.
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 .
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.
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!