I am developing a network application for Android, and I still stick to connecting my real Android device with a device emulator running on my desktop computer.
I created a private network with a router, so the only ones connected to the network are my computer and my mobile phone to avoid problems with the firewall / closed ports.
My pc ip is 192.168.1.100 and I am trying to ping each other so that I can achieve the maritime availability of each node network. Ping works fine from my PC (not the emulator console) on the phone.
The problem is that I want to ping the PC emulator from my mobile phone, not the PC itself ... For this, I use the emulator console ... Do I have to use my computer IP address or use another? I saw an ip like "10.0.xx" here http://developer.android.com/guide/developing/tools/emulator.html
But I assume that they are designed to connect two EMULATORS, right?
In addition, I tried to connect them by socket, creating a port forwarding through the emulator console, but I still can’t connect them.
Any clues? Thank!!
source
share