Question

I run a web project targeted to be deployed on the Google Appengine locally from within Eclipse. So the server starts up and it can be accessed normally by typing localhost:8080 into some browser. Everything fine so far. But what I need is to access it from outside, say from a friend's machine (which obviously resides in the same wireless network). So when he types the following <my-notebook-ip-address>:8080 he should reach the locally running webserver (within Eclipse). But that doesn't work!

The reason I need this is that I want my Android app running on my notebook within the Android emulator to access my locally running webserver. This is just possible by using the notebooks real ip address since localhost on the Android will be the phone itself.

Some more details

  • Mac OSX Snow Leopard
  • Eclipse Galileo
  • Webserver: Google Appengine (launched within Eclipse)

When launching the Appengine server from within Eclipse I can access it with: http://localhost:8080.
I cannot access it however from my local notebook (where the webserver is running within Eclipse) with: http://192.168.0.5:8080 where the IP is my IP address in the network.

I have all Firewalls disabled!

Was it helpful?

Solution

Not sure if this applies to your situation, but you can access the host PC from your Android device with 10.0.2.2 instead of localhost.

Ref.

official documentation

OTHER TIPS

More specifically, in the Eclipse->Run Configurations, select your run configuration, go to the "(x)= Arguments" tab and add the text --address=192.168.0.5

By default, appengine listens only on localhost.

Try starting GAE with the address parameter, e.g. "dev_appengine.py --address=192.168.0.5"

I only wanted to point out, in case it wasn't clear enough, that the 10.0.2.2 solution proposed by JRL works great but only for emulated Android devices. Real devices have to stick to Rob's approach.

Further details in: http://developer.android.com/tools/devices/emulator.html#networkaddresses

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top