Android connection to localhost

IP-address 10.0.2.2 is used to fetch data from the emulator.
Localhost will always point to the emulator/android device running the application.
To let your device fetch data from your pc, it should be in the same network (connected by WiFi to your router) and you should use the local IP-address of your pc (normally a 192.168.1.x-number).

Leave a Comment