Personal Blog of Mustafa Basgun

Check to See If Android Device is Connected to Internet by Using isReachable Method

with one comment

If you need to check to see if the Android device is connected to the internet, an alternative (and simple but limited) way to using the ConnectivityManager class can be calling the isReachable method. Here is a sample function:



Written by Mustafa Basgun

October 11, 2010 at 11:23 AM

One Response

Subscribe to comments with RSS.

  1. The problem with that is those nasty WiFi networks that redirect all your web access to a login web page. This code will resolve to the IP of their login server (like and will falsely claim that you are connected. It is much safer to double-check by downloading the page and checking if it contains some static string (that does not change with locale or their daily upgrades).


    January 20, 2011 at 12:09 PM

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: