Back to project page Dhamaschool.
The source code is released under:
Apache License
If you think the Android project Dhamaschool listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package group.ripple.dhamaschool; //ww w . j a va 2 s . c o m import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; public class NetworkListener { public static boolean isOnline(Context c) { ConnectivityManager cm = (ConnectivityManager) c.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo netInfo = cm.getActiveNetworkInfo(); if (netInfo != null && netInfo.isConnectedOrConnecting()) { return true; } return false; } }