Android – Connect to localhost from android device

androidlocalhost

i have already search this topic and still don't know how to make it work 🙁
I have a SOAP web service (ASP.NET), and this address (on my localhost) is http://localhost:50473/Service1.asmx

then i have soap client on my android device, i want to connect to use service from server.
Many people said that i can't connect through usb cable, and i have to connect to the same wifi network and use the internal IP.
Ok, now my laptop and android device both connect to the wifi network,
my laptop got 192.168.43.17
my android device got 192.168.43.26

So how can the device connect to the SOAP server above ?
from my device, i use 192.168.43.17:50473/Service1.asmx but no luck 🙁

Best Answer

You need to set uses-permission - android.permission.INTERNET in AndroidManifest.xml and also test that (http://192.168.43.17:50473/Service1.asmx) url on web-browser.