How find Internet connection is available or not on Android 4G?
<p>I have used Following Code For Wheather Intenet conection is available or not, its works fine upto 3G systems. but Its not working for 4G technology. Anybody have idea about How find Internet connection is Avlable or not on 4g?
if any body have democode for it, please provide it</p>

<p>Code: </p>

<pre><code>public static boolean checkConnection(Context c)
{
        ConnectivityManager mConnectivityManager = (ConnectivityManager) c.getSystemService(Context.CONNECTIVITY_SERVICE);
        TelephonyManager telephonyManager = (TelephonyManager) c.getSystemService(Context.TELEPHONY_SERVICE);

        if(mConnectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI).isConnected() || telephonyManager.getDataState() == TelephonyManager.DATA_CONNECTED)
            return true;
        else
            return false;
    }
</code></pre>

<p>Thanks in Advance 
Nirav modh</p>
