Code example for TelephonyManager

Methods: getNetworkCountryIso

	 * @return 
	public static String getCountry(Context context){
		 TelephonyManager telmngr = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
		 String networkCountryISO = telmngr.getNetworkCountryIso();
		 //if there is no phone connection (or in flight mode) the "networkCountryISO" is empty 
			 //if its not empty, return it 
			 return networkCountryISO;
			 // if its empty, return the default locale 
			 return Locale.getDefault().getCountry();
Contextual code suggestions in your IDE  Get Codota for Java