I\'m trying to connect my android application to a local host url thanks to wamp server but it doesn\'t work. My goal here, is to fetch json data and parse these data. For m
I assume you are trying to access web service available on your PC from either an android simulator or a real device.
For an android emulator, you must NOT just use "localhost", because "localhost" means android emulator itself, NOT the host PC.
you need modify the /etc/hosts file or the simulator or real device. add a line like "192.168.0.100 service.local".
if you are using your phone instead of emulator and running services on localhost then in url instead of '10.0.2.2' use IP address of your PC.
Just Install the "conveyor by Keyoti" the extension in Visual studio and it will generate a url according to your ip address automatically. here's the link:
conveyor
so far so good....!