I got the country iso by the code from this answer:
TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String countryCode = tm.getSimCountryIso();
how can I get the prefix phone number for country?
for example +972 for il.
I found a place where I can get the mapping in csv file. check here.
Also, I changed it into a class that translate the country code into phone prefix. here it is: