List of usage examples for android.location CountryDetector detectCountry
@UnsupportedAppUsage
public Country detectCountry()
From source file:com.android.mms.ui.MessageUtils.java
public static String detectCountry() { try {/* ww w.jav a 2 s . co m*/ CountryDetector detector = (CountryDetector) MmsApp.getApplication() .getSystemService(Context.COUNTRY_DETECTOR); final Country country = detector.detectCountry(); if (country != null) { return country.getCountryIso(); } } catch (Exception e) { e.printStackTrace(); } return null; }