Tuesday, May 24, 2011

How to enable internet access from Android emulator using proxy?

I was able to access internet in the past from Android 2.2 emulator but suddenly it stopped working. Problem was, I was behind firewall and I had to access internet using proxy server. I searched for solution and I found following command which worked for me.

Steps:
  1. Go to "<android-sdk-home>" directory and go to tools folder from command prompt.
  2. Type command: emulator -avd -verbose -http-proxy http://host-id:port
Above specified command will start virtual emulator, then I was able to access internet from Android browser.

If you are trying to access internet from any app, make sure you have set following internet access permission in your AndroidManifest.xml:
 <android:name="android.permission.INTERNET" /> 

1 comment:

Example code to connect node.js REST service with Eureka discovery service

Eureka is Spring based discovery service developed by Netflix. To know how Eureka is used at Netflix visit: https://github.com/Netflix/e...