[android-developers] Re: Checking the user's country

2009-09-12 Thread Anna PS

Thanks Roman, very helpful. Actually, it turns out that the dynamic
method is what I need after all.

best wishes,
Anna

On Sep 12, 3:24 am, Roman ( T-Mobile USA) roman.baumgaert...@t-
mobile.com wrote:
 What do you mean with user's country?

 Static methods:
 - You could use the phone number which is assigned to you. The phone
 number starts with the country code.
 - Also the IMEI has information about in which country your phone was
 approved/registered.

 Dynamic method based on your cellular connection (which you are not
 interested in):
 If you try to get information to which MNC-MCC you are connected use
 the TelephonyManager.getNetworkOperator() API. The MCC (mobile country
 code) is the information you are looking for. You can lookup which MCC
 code belongs to which country 
 athttp://en.wikipedia.org/wiki/List_of_mobile_country_codes.

 --
 Roman Baumgaertner
 Sr. SW Engineer-OSDC
 ·T· · ·Mobile· stick together
 The views, opinions and statements in this email are those of the
 author solely in their individual capacity, and do not necessarily
 represent those of T-Mobile USA, Inc.

 On Sep 11, 9:49 am, Anna PS annapowellsm...@googlemail.com wrote:



  Hi

  Anyone know how to check the user's country?

  I'm looking for a way that's faster than using GPS and reverse
  geocoding. (I need the country where the phone is registered, not
  their current location, in any case.) Is there any constant in the
  settings?

  Thanks,
  Anna
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Checking the user's country

2009-09-11 Thread Roman ( T-Mobile USA)

What do you mean with user's country?

Static methods:
- You could use the phone number which is assigned to you. The phone
number starts with the country code.
- Also the IMEI has information about in which country your phone was
approved card was approved.

Dynamic method based on your cellular connection:
If you try to get information to which MNC-MCC you are connected use
the TelephonyManager.getNetworkOperator() API. The MCC (mobile country
code) is the information you are looking for. You can lookup which MCC
code belongs to which country at 
http://en.wikipedia.org/wiki/List_of_mobile_country_codes.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Sep 11, 9:49 am, Anna PS annapowellsm...@googlemail.com wrote:
 Hi

 Anyone know how to check the user's country?

 I'm looking for a way that's faster than using GPS and reverse
 geocoding. (I need the country where the phone is registered, not
 their current location, in any case.) Is there any constant in the
 settings?

 Thanks,
 Anna
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Checking the user's country

2009-09-11 Thread Roman ( T-Mobile USA)

What do you mean with user's country?

Static methods:
- You could use the phone number which is assigned to you. The phone
number starts with the country code.
- Also the IMEI has information about in which country your phone was
approved/registered.

Dynamic method based on your cellular connection (which you are not
interested in):
If you try to get information to which MNC-MCC you are connected use
the TelephonyManager.getNetworkOperator() API. The MCC (mobile country
code) is the information you are looking for. You can lookup which MCC
code belongs to which country at 
http://en.wikipedia.org/wiki/List_of_mobile_country_codes.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Sep 11, 9:49 am, Anna PS annapowellsm...@googlemail.com wrote:
 Hi

 Anyone know how to check the user's country?

 I'm looking for a way that's faster than using GPS and reverse
 geocoding. (I need the country where the phone is registered, not
 their current location, in any case.) Is there any constant in the
 settings?

 Thanks,
 Anna
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Checking the user's country

2009-09-11 Thread Lance Nanek

Wow, I thought the getDisplayCountry() and getCountry() methods on the
Locale instance returned by java.util.Locale.getDefault() might be
helpful, but on my G1 they return the empty String when the phone's
Settings-Locale  text-Select locale setting is set to Spanish.
Returns the US when set to English at least. Surprised me because
the emulator has a list of languages and countries for that setting
and the methods return what's selected. Too bad.

On Sep 11, 12:49 pm, Anna PS annapowellsm...@googlemail.com wrote:
 Hi

 Anyone know how to check the user's country?

 I'm looking for a way that's faster than using GPS and reverse
 geocoding. (I need the country where the phone is registered, not
 their current location, in any case.) Is there any constant in the
 settings?

 Thanks,
 Anna
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---