I read a number of examples through this website, but none of them worked on emulator. Sharing the posts I read:
- How to determine Android internet connection?;
- android: how to know internet connection is available or not in device ?;
- how to turn internet connection (GPRS/EDGE/3G) on/off;
- Android Application: Got Internet Connection;
- How find Internet connection is available or not on Android 4G?.
Just to clarify, when I turn off the PC network connection, the emulator still returns true
.