Connect Emulator to the Internet

If your computer is connected to the internet, you don’t have to do anything special to connect your emulator to the network. To paraphrase, you will have to adjust the settings only if you are sitting behind a proxy (or if working with earlier versions of emulator, in case of DNS problems). Just type a URL into the browser and it should work.

Here I listed some ways on how to enable emulator to access internet.

#1: Setup Google Account
Just setup your Google Account on that emulator.

#2: F8
By default, you should be able to toggle the Internet access to your emulator with F8 (on Windows) and Fn + F8 (on Mac OS X) – I think F8 also works for Linux, but I’m not 100% sure.

With this shortcut, you get the ACTION_BACKGROUND_DATA_SETTING_CHANGED dispatched.

#3: DNS setting
If your using Eclipse: 3.6 (Windows), Go to Window > Preference > Android > Launch
Default emulator options: -dns-server 8.8.8.8,8.8.4.4. Or you can try your DNS.

#4: Proxy setting

  1. Right click on the Project in Eclipse
  2. Select Run As -> Run Configurations …
  3. Select Android Application and then select “target” tab
  4. Looking for “Additional Emulator Command Line Options” and put this command line to text box-http-proxy http://< username >:< password >@< hostname >:< port >

Related Posts: