Connecting to localhost issue

  • Thread starter Thread starter Android Central Question
  • Start date Start date
A

Android Central Question

Hi,all I am developing an app that use a webview. everything work except connecting to my localhost web devp environment. How to do this? Please advise.
 
You can't connect to "this computer" (which is what "localhost" means), you connect to a particular port on a computer, which means that you have to have a server app listening on that port on that computer. For a webview, that would be port 80, and you need a web server running on the computer (or phone). If you don't want to install a whole web server, WiFi File Transfer runs as a web server, so you can run it to test things (run it, then tap Home and WiFi File Transfer will keep running), connect to localhost (or, with most phones, your local IP address), then go back to WiFi File Transfer (swipe up on the home icon and scroll to fine it, then pull it down) and close it. (Then uninstall it if you don't want it taking storage space, but it's a small app, and it's useful.)
 

Trending Posts

Members online

Forum statistics

Threads
954,312
Messages
6,961,269
Members
3,162,990
Latest member
xa21