Back to project page ShowMeTweets.
The source code is released under:
MIT License
If you think the Android project ShowMeTweets 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 com.fcduarte.showmetweets.utils; /*from www. j a v a 2 s.c o m*/ import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; public class ConnectivityUtils { public static boolean isConnected(Context context) { ConnectivityManager cm = (ConnectivityManager) context .getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); return activeNetwork != null && activeNetwork.isConnectedOrConnecting(); } }