1. Check out our companion app, Forums for Android! Download from Google Play

Find the user's zip code

Discussion in 'Application Development' started by wige, Dec 14, 2009.

  1. wige

    wige Well-Known Member
    Thread Starter

    Oct 28, 2009
    Director of IT
    Pennsylvania, USA
    I am creating a new app that will allow users to search for local concerts. This app will pull data from a web database that uses a supplied zip code or state to determine the market area that should be searched.

    What is the best way to determine a user's current zip code? I can't seem to find much documentation on getting information from the user's network location - how to do it, what format it is in, ways to convert that to a zip code - all the samples seem to use the GPS, which is overkill for this app. Any suggestions?


  2. mkhopper

    mkhopper Well-Known Member

    Oct 15, 2009
    Sounds like a good idea for an app.

    Even the user's network location is stored as lat/long in the phone. It just isn't as precise.
    For a zipcode lookup though, it ought to be more than close enough.

    I couldn't find any easy way to do a web lookup that returns a zipcode based on lat/long, but I did find a free database in .csv format that gives this information.

    It's a few years old, but may serve as a start.

    Free Zip Code Latitude and Longitude Database

Share This Page