Connect an Android Device To a Web Service on Local Host

It’s much simpler way supported by google!

  • Connect your phone via usb to computer and enable usb debugging
  • On your computer open Chrome browser and type exactly this address: chrome://inspect/#devices
    enter image description here
  • Now you can link your computer port to your device port by port forwarding button. On my computer I have service on address localhost:61437 and I just linked it to device’s 8081 port. Remeber to check ‘Enable port forwarding’ checkbox

enter image description here

  • screen from service on my computer ( localhost:61437 )
    enter image description here

  • screen from my mobile browser with the same service ( localhost:8081). And that’s it. Also you use this service address in your application
    enter image description here

Leave a Comment