I\'m able to access my laptop web server using the Android emulator, I\'m using 10.0.2.2:portno works well.
10.0.2.2:portno
But when I connect my real Android phone, th
The easier way to default localhost is to use http://localhost:port. This works in a laptop and Android as well.
If it does not work, then in android set the default IP of your phone to 127.0.0.1:port :)
Open terminal and type :-
hostname -i #127.0.0.1 hostname -I #198.168.*.*