Quick method for capturing country...

by atrus123 » Mon, 03 Nov 2008 00:05:15 GMT


Sponsored Links
 Is there a class that provides quick method for capturing the user's
country without needing to query the GPS?
--~--~---------~--~----~------------~-------~--~----~



Quick method for capturing country...

by Kipling Inscore » Mon, 03 Nov 2008 00:19:27 GMT


 You can use cell- or WiFi-based coarse location. You still have to go
through the same process with a LocationManager and Geocoder as you do
for GPS, but you can probably usually get away with
getLastKnownLocation() instead of requestLocationUpdates()...unless
the user just got off of an international flight (and the radios have
been and may still be turned off).
Instead of using a Criteria with ACCURACY_FINE, use ACCURACY_COARSE
and in AndroidManifest.xml, instead of uses-permission
ACCESS_FINE_LOCATION, use ACCESS_COARSE_LOCATION.




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Quick method for capturing country...

by Charlie Collins » Mon, 03 Nov 2008 08:05:25 GMT


 You can get the SIM country, and network country, from
TelephonyManager.

 http://code.google.com/android/reference/android/telephony/TelephonyManager.html 

That's not location aware of course, it's just where the SIM and
network are registered, but that may be more appropriate anyway,
depending on your use case.




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. AVD?

Hi.

I dont know how to set a project target. Can you tell me? I got 2
errors.
Thanks.


[2009-12-21 16:57:39 - NewTest]Still no compatible AVDs with target
'Android 1.1': Aborting launch.
[2009-12-21 16:57:39 - NewTest]Performing test.test.test.hello
activity launch
[2009-12-21 16:57:56 - NewTest]Project has no target set. Edit the
project properties to set one.
[2009-12-21 16:57:58 - NewTest]Launch canceled!

-- 

2. Soft keyboard allows input when field is disabled

I have disabled a text field but the soft keyboard still allows me to
enter text.

how do I stop this?

-- 

3. Tanya: ROM Eclair

4. Preferred way of finding out *what* changed in a ContentObserver

5. Dynamic AppWidget Background Color

6. Camera recorder fail to prepare on Android 2.0.1

7. sqlite3_open_v2 failed error