Code example for NetworkInfo

Methods: getExtraInfo, getSubtypeName, getTypeName

0
                break; 
            case RunningAppProcessInfo.IMPORTANCE_SERVICE:
                res = "service";
                break; 
            case RunningAppProcessInfo.IMPORTANCE_VISIBLE:
                res = "visible";
                break; 
            default: 
            } 
 
        }         
        return res;
    } 
     
    private static String getDataConnectionStatus() {
        String res = null;
         
        NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
         
        res = "Type: '" + networkInfo.getTypeName() 
            + "' SubType: '" + networkInfo.getSubtypeName()