I am using Emulator to test app.
Problem is Internet on emulator wont work if laptop is connected to LAN. But it works if I connected with Wifi.
I have gone through many answer of similar kind,
I am using Emulator to test app.
Problem is Internet on emulator wont work if laptop is connected to LAN. But it works if I connected with Wifi.
I have gone through many answer of similar kind,
You need android.permission.INTERNET, as it was mentioned. You need also:
ACCESS_NETWORK_STATE - to check if you can use Internet and why not
Maybe CHANGE_NETWORK_STATE
also look here
also You can start your AVD in CMD prompt like this
C:\program files\android\android-sdk-windows\tools\emulator -avd -dns-server 8.8.8.8
This is google public DNS. The problem seems to be that the emulator can't find the DNS your computer is currently using. (cite from here)
vnshetty managed with: I edited avd with value "GPS support= yes" and restarted the emulator. now working....
more cite: You don't need to set any setting to access internet on emulator unless you are behind a proxy, in case you are behind a proxy start your emulator from command prompt with following command: C:/emulator -avd avdname -http-proxy http://your.proxy.ip:8080 - it seeems to me even more useful .
Solution is to turn off wifi if using LAN and vice versa. It works, at least for me.