How to browse localhost on Android device?

I use my local ip for that i.e. 192.168.0.1 and it works.


to access localhost on emulator: 10.0.2.2. However this may not always work for example if you have something other than a web server such as XMPP server.

assuming that you're on the same wireless network...

  1. find your local ip (should be something 192.168.1.x) - go to the command line and type 'ipconfig' to get this. where x is the assigned local ip of the server machine.

  2. use your local ip for your android device to connect to your localhost.

it worked for me.


Easier way to check is in browser of emulator type 10.0.2.2 instead of localhost.