I've been using this method to gain access to internet from my Android emulator emulator -http-proxy <<proxy-name>> -avd <<avd_name>>
It works but is that the best way to do it? It just doesn't feel right that I need to open the emulator from command line and can't just do it from Eclipse or something.
Can't seem to find an internet option on the "AVD Manager" either.
Go to your Android\Sdk\emulator folder and open command prompt. Type emulator -list-avds to see available emulator names. Type emulator -avd name-of-your-device -netdelay none -netspeed full -dns-server 8.8. 8.8 command and press enter.
Then run one of the available emulators with the command, “emulator -avd DEVICE_NAME”, followed by the argument “-dns-server 8.8. 8.8”. This will launch the emulator and overwrite the default DNS server address, replacing it with the address of the primary DNS server for Google DNS.
The Android UI is pretty simple, if your connected to Wifi it shows in the notification bar, it can also show your cellular connectivity at the same time depending on what has happened. All you have shown is that you can use the emulator on a wifi connected host machine, which is not what this question was asking.
You could also try explicitly specifying DNS server settings, this worked for me.
In Eclipse:
Window>Preferences>Android>Launch
Default emulator options: -dns-server 8.8.8.8,8.8.4.4
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.
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With