Answers for "android wifi check if network is available"

1

check network connection android

private Boolean isNetworkAvailable() {
    ConnectivityManager connectivityManager 
          = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
    NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
    return activeNetworkInfo != null && activeNetworkInfo.isConnectedOrConnecting();
}
Posted by: Guest on August-21-2021

Code answers related to "android wifi check if network is available"

Browse Popular Code Answers by Language