Code example for TelephonyManager

Methods: getNetworkCountryIso

0
        return String.format("%s\n%s\n%s\n%s\n%s\n%s\n", getCountry(context), getBrandInfo(), getModelInfo(), getDeviceInfo(),  getVersionInfo(context), getLocale(context));
    } 
 
    public static String getCountry(Context context) {
        TelephonyManager mTelephonyMgr = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
        return String.format("Country: %s", mTelephonyMgr.getNetworkCountryIso());
    } 
 
    public static String getModelInfo() {
      return String.format("Model: %s", Build.MODEL);
    } 
     
    public static String getBrandInfo() {
        return String.format("Brand: %s", Build.BRAND);
    } 
 
    public static String getDeviceInfo() {
        return String.format("Device: %s", Build.DEVICE);
    } 
 
    public static String getLocale(Context context) {