Local Multiplayer Android Unreal Engine 5.4.4

Hi everyone,

Has anyone managed to get a local multiplayer on Android working in Unreal Engine 5.4.4?

I try Create, Find and Join Session by default but doesnt work, also I try to use the plugin UE5 Multiplayer Plugin Main from Github but doesnt work too (plugin is for 5.1 and my UE is 5.4.4)

I try also with IA (ChatGPT) but they doesn’t get the answer or solution.

The question is…its broken (bug) the Unreal Engine for make Local Multiplayer under Android?
If is not broken how you can do it, for local multiplayer under android, when I said local is share the same wifi, one movil is doing the host, and the other the client.

Thanks guys

i have made it work with 5.2 and 5.3 so i’m pretty sure it woks.

classical. imho ai is not helpful for bugs on ue.

that is ok.

you can check the ue bug tracker. but i doubt it’s a bug. that’d be a major issue.

they have to be on the same wifi, and the wifi has to allow inter client communication, and allow to open ports.
the clients themselves have to be able to open ports.
all that by default is enabled. but worth checking the wifi.

all you need is the “null online subsystem”.
you need to make sure the settings for the session is “allow join when started”. i can’t recall but i think there’s also a flag for allow local.

beware there’s a limit on how many clients you can connect. i don’t remember exactly i think it was around 16. you can increase in a config file, but you have to optimize your network code.

note that if you’re using one of the mobiles as server (authoritative client) some of your code might need to be adjusted.
for example checking the netmode. as “standalone” won’t be used, but listen server instead.
also beware that hasAuthority is ambiguous on some cases.

another alternative is just start your tests without the online subsystem. and have the “listen server” travel to a map with the option to be a server (i think it was “listen”).

then have a ui on the client where you input the ip. and a button to travel to that server.
if that works, you can upgrade to the null online subsystem.

i’d make sure to remove other plugins that might collide with the null online subsystem. (like that ue5 multiplayer plugin you found which i don’t think it’s made by epic, or maybe the steam subsystem, or eos).

1 Like

Thanks for the answer :slightly_smiling_face:, but now you create me a few doubts. I will specify a little more.

My project is in Android under C++ (but I’m using blueprint)
I’m trying do Android LAN multiplayer in UE 5.4.4 using OnlineSubsystemNull.

One device hosts (listen server), the other should auto-join via FindSessions without any manual IP entry (it’s for 2 player video game and I want do it automatically), so my doubts are:

  1. Android permissions – Did you need to add extra network permissions (INTERNET, ACCESS_WIFI_STATE, CHANGE_WIFI_MULTICAST_STATE) manually to the AndroidManifest for LAN discovery to work?
  2. Subsystem initialization timing – On Android, do you delay the FindSessions (in GameMode or GameInstance) call after loading the map to ensure the OnlineSubsystem is ready? If yes, how long or what trigger do you use?
  3. Session settings – For LAN discovery, which exact flags do you set on CreateSession (bIsLANMatch, bAllowJoinInProgress, NumPublicConnections, etc.)?
  4. Network isolation – In your Android tests, was “client isolation” disabled on the Wi-Fi network, or did it work on standard phone hotspot mode without extra configuration?

I hope you can asnwer a few doubts to follow your exactly setup, because I am lost in this topic.

Hey, it seems to me that you’re using chatgpt to format your post. if possible could you avoid it? it makes it hard to read for me.

Hello, i’ts ok. it’s the best way to approach a problem. little by little.

  1. i don’t remember. i did added a few permissions. you do need network permission.
  2. there’s no delay needed. i think i used the game mode BeginPlay. it’s a safe place, the subsystems should be ready by that point.
  3. IsLanMatch, AllowJoinInProgress*1, Advertise (or similar name). The num players has to have the maximum allowed players. (note there’s another limit in the configs
  4. i’m not acquainted with client isolation. i would disable it. i did not use a hotspot. i used an actually regular wifi access point. try that one first, if that works, then move to the hotspot. a general strat is to reduce the surface area until it works.

*1 allowjoininprogress might confuse you a bit, it does something specific. it’s ok to set it to true to begin with. but later try to read and understand what does it do. “Progress” means the “match” is playing. (you control when the "match’ starts)

1 Like

i just checked i do have a delay of 1 sec, but it “shouldn’t” ™ matter.

these are the settings i’ve used

FOnlineSessionSettings Settings;
Settings.NumPrivateConnections = 0;
Settings.NumPublicConnections = NumPublicConnections;
Settings.bAllowInvites = true;
Settings.bAllowJoinInProgress = true;
Settings.bUsesPresence = false;
Settings.bAllowJoinViaPresence = false;
Settings.bAllowJoinViaPresenceFriendsOnly = true;
Settings.bIsDedicated = true;
Settings.bIsLANMatch = true;
Settings.bShouldAdvertise = true;

these are the permissions

1 Like

Thank you so much! works perfect :folded_hands: