I'm new for android, In my app i have three edittext and one button. If user enter their mobile number and press buttons means automatically country code and country name filled in other edittext.
I used below code
TelephonyManager tm = (TelephonyManager)getActivity().getSystemService(getActivity().TELEPHONY_SERVICE);
String countryCodeValue = tm.getNetworkCountryIso();
Log.d("CountryCOde",countryCodeValue);
But, It not working in without sim(Tablet). So, i want to get country code and name with help of mobile number. Want to work without sim also.