Code example for NetworkInfo

Methods: getTypeName

0
        NetworkInfo mobNetInfo = connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
        if (activeNetInfo != null) {
            Toast.makeText(context, "Active Network Type : " + activeNetInfo.getTypeName(), Toast.LENGTH_SHORT).show();
        } 
        if (mobNetInfo != null) {
            Toast.makeText(context, "Mobile Network Type : " + mobNetInfo.getTypeName(), Toast.LENGTH_SHORT).show();
        } 
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE