0

I am developing an android app and I want three dropdown having country, state and city. How do I get the database for this? Is there any google api which could help me as in google maps, when we start entering address, it auto suggests the full address including city, state and country.

I found some companies provide this database but they charge a lot and I think there would be some easy way to do this.

Ankush
  • 675
  • 2
  • 13
  • 29
  • Do you want the list of countries or a tutorial on how to create dropdowns? –  Mar 14 '15 at 03:46
  • @n1ckname152 I want the database, i know how to create dropdowns. I want to know how to get all countries database then states in them then cities. I would be huge, I think so. – Ankush Mar 14 '15 at 04:18
  • check the answers below; they have a variety of databases –  Mar 14 '15 at 04:20

2 Answers2

0

You can take a look at this link for combining Google Maps Addresses with your Android app: Adding Place Autocomplete to your Android App.

Of course, you'll need to sign up for a Google Maps API Key.

Also, if you use the (free) Android Studio IDE, there is help for creating a sample app that uses Maps.

For a FREE listing of cities of the world, you can try these:

MiStr
  • 1,193
  • 10
  • 17
-1

There's plenty of examples of this data being available free on the internet. Lots of developers need data like this, so other developers share their compiled lists online. They often even keep them updated via version control sites.

Just Google something like 'JSON list of countries'. Here's just one I found.

It's a very comprehensive list of countries, and every city inside each country. This data is in JSON format, which is quite easy to parse in Android. This post explains it pretty well

Community
  • 1
  • 1
1owk3y
  • 1,115
  • 1
  • 15
  • 30