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" /> 

No comments:

Post a Comment