An Android mobile actually does know quite well where it is - but is there a way of retrieving the country by something, like a country code or country name?
There isn't any need to know the exact GPS position - the country code or name is sufficient, and I am using this code:
String locale = context.getResources().getConfiguration().locale.getCountry(Locale.getDefault());
System.out.println("country = "+locale);
It gives me the code "US", but my device kept in India. Is there a way to find the device's current country code without using GPS or a network provider?
Because I am using a tablet.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…