Android Open Source - open-radiobrony Utils

From Project

Back to project page open-radiobrony.


The source code is released under:

Apache License

If you think the Android project open-radiobrony listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.lesikapk.openradiobrony;
//from   ww  w  .  j  a va  2 s  .c  o  m
import android.content.Context;

public class Utils {

    public static final boolean internetAvailable(Context context) {
      ConnectivityManager connectivityManager = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
    NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
    return activeNetworkInfo != null && activeNetworkInfo.isConnectedOrConnecting();

Java Source Code List