Android Check Data Connection suggest change

Check connection using ConnectivityManager

public static boolean isConnectedNetwork (Context context) {

    ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
    return cm.getActiveNetworkInfo () != null && cm.getActiveNetworkInfo ().isConnectedOrConnecting ();

}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents