NanoHttpd / nanohttpd

Tiny, easily embeddable HTTP server in Java.
http://nanohttpd.org
BSD 3-Clause "New" or "Revised" License
6.92k stars 1.69k forks source link

Access from local network computers #533

Open ABPSoft opened 5 years ago

ABPSoft commented 5 years ago

Hi How can I access to Android HTTP Server from another computer? I want to run my app in an emulator to run always. Now I want to access from local network computers.

Thanks

crearo commented 5 years ago

Yes you can. Start the nanohttpd server at say port 8080 get the ip address of your android phone

open your browser and go to http://ip-of-phone:8080

if you're running in the emulator, it might not be so straight forward. i haven't tried it.