Android Utililty Methods Network Information Get

List of utility methods to do Network Information Get

Description

The list of methods to do Network Information Get are organized into topic(s).

Method

NetworkInfogetNetworkInfo(Context context)
get Network Info
ConnectivityManager cm = (ConnectivityManager) context
        .getSystemService(Context.CONNECTIVITY_SERVICE);
return cm.getActiveNetworkInfo();
NetworkInfogetNetworkInfo(Context context)
Get the network info
ConnectivityManager cm = (ConnectivityManager) context
        .getSystemService(Context.CONNECTIVITY_SERVICE);
return cm.getActiveNetworkInfo();
StringgetProvidersName(Context context)
get Providers Name
String ProvidersName = null;
TelephonyManager tm = (TelephonyManager) context
        .getSystemService(Context.TELEPHONY_SERVICE);
String IMSI = tm.getDeviceId();
if (IMSI.startsWith("46000") || IMSI.startsWith("46002")) {
    ProvidersName = "";
} else if (IMSI.startsWith("46001")) {
    ProvidersName = "";
...
intgetCallState(TelephonyManager tm)
get Call State
return tm.getCallState();
StringgetDeviceId(TelephonyManager tm)
get Device Id
return tm.getDeviceId();
StringgetDeviceSoftwareVersion(TelephonyManager tm)
get Device Software Version
return tm.getDeviceSoftwareVersion();
StringgetLine1Number(TelephonyManager tm)
get Line Number
return tm.getLine1Number();
StringgetNetworkCountryIso(TelephonyManager tm)
get Network Country Iso
return tm.getNetworkCountryIso();
StringgetNetworkOperator(TelephonyManager tm)
get Network Operator
return tm.getNetworkOperator();
StringgetNetworkOperatorName(TelephonyManager tm)
get Network Operator Name
return tm.getNetworkOperatorName();