Samitha Chathuranga
Samitha Chathuranga

Reputation: 1749

Android:How to get current location NAME of user in the way a most primitive phone does it? (without internet or gps)

There are many questions and answers in stack overflow on how to get the location latitude and longitude without using gps or internet. But I want to get the location's name (such as city name) in that way. Most primitive non-smart mobile phones (i.e Nokia 1110) show location name on the home screen. Those phones doesn't have internet or gps. So there should be a way to get the location name just by signal tower details, in android too. How to do this?

Upvotes: 3

Views: 2015

Answers (2)

AlexWien
AlexWien

Reputation: 28747

I can give you a simple soultion when using GPS signal:

Just dondload the file with the most populated 15.000 cities in the world from geonames.org. Import that into a quad tree spatial index, and search the next city to your place using the quad tree index.

To check if the solution is feasible, you first may leave out the quad tree index, and do a brute force search.

Upvotes: -1

shkschneider
shkschneider

Reputation: 18243

Since API-17, CellIdentity* classes were introduced:

That is all I can think of. I hope better tools exists.

Upvotes: 2

Related Questions