How to create a server on Android?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By PRoToRiaN

Hi. I’m trying to create a simple project with two buttons and a text field. The first button create the server, and the second client. The network_unique_id is displayed in the text field. On the PC platform everything is in order, but when i try to create a server on the android, in the field displays 0. If I understand correctly, this indicates a failure. For what reason this problem can occur and how can it be solved?

:bust_in_silhouette: Reply From: Tova

take a look at this multiplayer bomber demo, it might help you out

Thanks, but i saw this project. The problem is the same. The server does not start. Maybe I’m not doing something that is necessary to start correctly? IP, port, permissions, anything else?

PRoToRiaN | 2018-07-09 10:35

what do you mean by “it does not start” ? you press host but you can’t connect with other devices?

Tova | 2018-07-09 10:55

First of all, I can not run the game. “START!” Button inactive.

PRoToRiaN | 2018-07-09 11:03

i have just downloaded that demo and it works fine for me, i just import it, run it, press host and i can start the game

Tova | 2018-07-09 12:23

On mobile device or on PC? On PC everything is in order. If I’m not mistaken, the function create_server returns error with value ERR_CANT_CREATE.

PRoToRiaN | 2018-07-09 12:38

for me it works on mobile device too, i even use that in my own game (but i’ve modified the script according to my needs)

Tova | 2018-07-09 13:51

:bust_in_silhouette: Reply From: Tova

i’ve looked into it now, you need to go to export options for android and put Internet permission “On”

Yes. There was a problem in that. The documentation is not enough information about this. Thank you.

PRoToRiaN | 2018-07-09 17:34