1

How can I get the regional setting of user's mobile in android? As I can't find related information how to get it in android.

eg. if his current setting is in Singapore, will get Singapore.

0

3 Answers 3

2

Check out the Locale class for localization / regional information :

http://developer.android.com/reference/java/util/Locale.html

Ex. Locale defaultLocale = Locale.getDefault();

Read the section labeled "Be wary of the default locale" which can save you from some issues with getDefault() from the Locale class when used for more than just user presentation.

Sign up to request clarification or add additional context in comments.

Comments

1

This might help

Context c = getBaseContext(); Resources r = c.getResources(); Configuration config = r.getConfiguration(); Locale currentLocale = config.locale; 

Comments

0

The simplest way from an Activity is:

Locale l = Locale.getDefault(); Log.d("TAG", "Country: " + l.getDisplayCountry()); 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.