简体   繁体   中英

Get the user's approximate location without GPS / WiFi / Internet

I'm trying to find a way of checking if the user is in the US, and do it somehow that it's instant. This means no GPS, and no internet. I have a few ideas, but they're not as accurate as I'd want, so maybe someone here has some tricks up his/her sleeves.

Thanks!

I've just been looking at http://developer.android.com/guide/topics/resources/providing-resources.html and on table 2 there's some resource qualifiers for 'MCC and MNC' and 'Language and region'.

What about defining some resource, say a string indicating the country code, then setting up a different one for each country you are interested in.

You could then look at the string to see what country you are in. I guess you'd need a bit of experimentation to see what works best, but it might work :-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM