How can I access my localhost from my Android device?

前端 未结 30 2359
面向向阳花
面向向阳花 2020-11-21 05:53

I\'m able to access my laptop web server using the Android emulator, I\'m using 10.0.2.2:portno works well.

But when I connect my real Android phone, th

30条回答
  •  無奈伤痛
    2020-11-21 06:28

    A solution to connect my mobile device to my wamp server based on my laptop:

    First, wifi is not a router. So to connect my mobile device to my wamp server based on localhost on my laptop, I need a router. I have downloaded and installed a free virtual router: https://virtualrouter.codeplex.com/

    Configuring it is really simple:

    1. right click on virtual router icon in System Tray
    2. click on Configure virtual router
    3. fill a password
    4. if your internet connection is in ethernet, choose Shared connection : Ethernet
    5. Then set wifi on on your laptop and device
    6. On your device connect to the virtual router network name

    Then you can connect to your laptop via your device by launching a browser and fill the IPV4 address of your laptop (to find it on windows, type in cmd : ipconfig, and find ipv4 address)

    You should see your wamp server home page.

提交回复
热议问题