I'm trying to create 开发者_运维知识库an Android app that searches for a certain type of business near the user's current location. I found the Google Places API, but it doesn't look like you can specify what type of place you want to search for. They also say you're not allowed to filer the results, so I can't even just filter out the ones i'm actually looking for.
Does anyone have any suggestions on how to search for nearby places of a certain type? This will eventually be displayed using the Google MapView for the Android. But the big problem I'm facing right now is how to get the list of businesses I'm looking for.
Thanks for any help you can give!
Currently I feel the service with the best crowdsourced business data is Yelp, and lo and behold, they have an API. You can execute searches in a few different ways, including narrowing by category.
If you look at the Places API, the results return an array of types, which include terms like "restaurant", "food", etc. Maybe you can filter on these terms.
Combine this with some reflective XML parsing on some plain objects and you'd have a pretty powerful system. I'd guess this is how the official Android Places app works.
Although Places isn't on this list, the GData-java-client library can be used with Android. You can get some ideas for parsing and style from the examples there.
精彩评论