I\'m able to access my laptop web server using the Android emulator, I\'m using 10.0.2.2:portno
works well.
But when I connect my real Android phone, th
First of all make your machine(where server is running)IP address static. Enter this static IP address in the android code.
Next go to your wifi router's interface and check the left panel. You will see option such as port forwarding/forwarding. Click on it and forward port 80.
Now edit your htttpd.conf
file and edit it for
Allow from All
. Restart your server. Everything should work fine now.
Additionally you can reserve the IP address of your machine so that it is always allocated to you.
In the left panel of your router's interface, find DHCP -> Address Reservation
, click on it. Enter your machine's MAC address and the IP address you have entered in the code. Click on save. This will reserve the given IP address for your machine.