bloxtr
bloxtr

Reputation: 39

UDP Connection between Android emulator / host

I'm trying to get a network connection between the Android emulator and the host. My application on the android device communicates to the apllication on the host via UDP port 2222.The host is reachable via 10.0.2.2 (ping). The emulator (10.0.2.15) is not reachable from the host system. Could someone help me?

Thank you...

Upvotes: 0

Views: 1698

Answers (1)

Squonk
Squonk

Reputation: 48871

I don't use the emulator much so I may be wrong but you may need to use a Network Redirection.

Follow the instructions in that document using something like...

redir add udp:5000:2222

To communicate (from your host to the emulator) your host then needs to connect to 127.0.0.1:5000 which will be redirected to 10.0.2.15:2222

If that still doesn't work then check any firewall software running on you machine which might be blocking things.

Upvotes: 2

Related Questions