Quantcast
Channel: How can I access my localhost from my Android device? - Stack Overflow
Viewing all articles
Browse latest Browse all 48

Answer by Ajmal Ansari for How can I access my localhost from my Android device?

$
0
0

This solution is usable when your mobile device and computer is not in same network:

You need to use port forwarding in this case. In the Google chrome inspect window (chrome://inspect) You can see the connected devices. enter image description here

Click on the port fowading button, and set a random port say 3000 to the port which your laptop uses say 8080.

enter image description here

now use localhost:3000 from from device to access the localhost:8080(or_whatever_ip:portno) in the laptop. You can check it in the mobile browser. Try localhost:3000 in the mobile browser. Make sure to check the "Enable port forwarding" checkbox in the "Port forwarding settings" window


Viewing all articles
Browse latest Browse all 48

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>