List of usage examples for android.content Context COUNTRY_DETECTOR
String COUNTRY_DETECTOR
To view the source code for android.content Context COUNTRY_DETECTOR.
Click Source Link
From source file:com.android.mms.ui.MessageUtils.java
public static String detectCountry() { try {//w ww . j av a 2s . c o 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; }