Access the site from the Genymotion emulator

I am trying to connect from my application to the host using the IP address 192.168.56.1 , but without success. I checked in ipconfig and there is a Virtualbox connection with the above IP. Can someone help fix this?

+40
android android-emulator genymotion
Aug 27 '13 at 10:48 on
source share
5 answers

try this IP address: 10.0.3.2 It should work

+98
Sep 22 '13 at 3:36 on
source share

I had the same problem as the OP, switching to Bridged for Adapter 2 fixed the problem for me.

 VirtualBox > Settings > Network > Adaptor 2 Attached to: Bridged Adapter Name: en0: Wi-Fi (airport) 
+6
Jan 26 '14 at 19:06
source share

Try checking (works for me) ...

On your host, run the simplest web server in some random directory:

 $ python -m SimpleHTTPServer Serving HTTP on 0.0.0.0 port 8000 

Now in your genymotion Chrome device startup, go to http://192.168.56.1:8000 and you will see a web page listing the contents of the directory in which you looked at SimpleHTTPServer.

This shows that the connection from the guest to the host at the IP address you specify is working. There must be another problem.

+2
Sep 18 '13 at 19:10
source share

It is actually very easy to find the IP address of your host!

Linux (and supposedly Mac)

Just open a terminal ( Ctrl + Alt + T ) and run ifconfig . The IP address can be found in the interface information named vboxnet<number> .

Window

Just open CMD ( Windows logo key + R , " cmd ") and run ipconfig . The IP address can be found in the interface information with something like " vbox " or " VirtualBox " in the name.




There may be several interfaces on this list that meet these criteria, so you need to try which one is correct.

+1
May 27 '16 at 8:38
source share

Even I had the same problem, and here is the solution:
Your computer must be "ON" when connected to the database
If you provide a port number but are not using the Internet, this will not work.
However, if you do not specify a port number, and computer Internet is turned on, you should get an exit.

Here is the result without the Internet in one of my programs Output without internet

And here is the Internet connection

Output with internet

Also make sure that WIFI is turned on in the Genymotion emulator and its operation. You can verify this by opening a browser inside the emulator and opening any web page address.

Please comment if further assistance is required.

0
Mar 16 '14 at 5:45
source share



All Articles