Method to check if the Android device is connected to the Internet.