I want to check programmatically whether there is an internet connection in Android phone/emulator. So that once I am sure that an internet connection is present then I'll make a call to the internet.
So its like "Hey emulator! If you have an internet connection, then please open this page, else doSomeThingElse();"
From my OLD Answer here
Just try this
I have applied the solution provided by @Levit and created function that will not call the extra Http Request.
It will solve the error
Unable to Resolve Host
Now call it like,