Android multiplayer wlan: Android as host device problem

Now on 4.24.3 it only can join by “open my.local.ip.address” sometimes. Doesn’t work most times. Never figured out why. Anyone know anything?!!

this fixes the problem of 4.23 too (maybe it will fix 4.24, 4.25, 4.26 same problem, but I don’t check)
but you have to add #if PLATFORM_ANDROID around changes in SocketSubsystemAndroid.cpp file then it would works
I just changed the FSocketSubsystemAndroid::GetLocalHostAddr method and it helps me and fixed all problems with hosting and connecting to the existed game. All of these fixes also work in blueprints!!!

2 Likes

Once you do this and your using the github build of the engine… it takes forever because it has everything…

Then all you to do for android network capability is ; enable the plugins, (project settings)- android and google play services… just enable it, (can fill out later when you start with the app store) Then add this to the DefaultEngine.ini

[OnlineSubsystem]
;DefaultPlatformService=Null
;DefaultPlatformService=GooglePlay

All this does is pretty much say you going to use that stuff… so if you want to use Steam for example, then you need to add the steam stuff… which is another DefaultPlatformService=Steam I think… then other stuff, so not so simple.

[OnlineSubsystem]
;DefaultPlatformService=Null
;DefaultPlatformService=Steam
;DefaultPlatformService=GooglePlay

Something like that maybe… not sure about the “Steam” setting… just an example.

1 Like