Back to project page worldwondersproject.
The source code is released under:
MIT License
If you think the Android project worldwondersproject 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.ciandt.cursoandroid.worldwondersapp.infrastructure; //from w ww . j a v a 2s. c o m import android.content.Context; import android.net.ConnectivityManager; public class NetworkUtil { public static boolean isConnectionAvailable(final Context context) { ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); if (connectivityManager.getActiveNetworkInfo() != null) { boolean connectionAvailable = connectivityManager.getActiveNetworkInfo().isConnectedOrConnecting(); return connectionAvailable; } else { return false; } } }