Check online status android
<p>this is a very noob question sorry.</p>

<p>Im using this code to check if the device is online as the app loads.</p>

<pre><code>public boolean isOnline() 
{
    ConnectivityManager connMgr = (ConnectivityManager) 
            getSystemService(Context.CONNECTIVITY_SERVICE);
    NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
    return (networkInfo != null &amp;&amp; networkInfo.isConnected());
}  
</code></pre>

<p>But this ALWAYS returns true, even if it have the computer Wifi turned off for testing.   Is this function just testing for the ability to connect or actual connection?</p>

<p>Thanks!</p>
