开发者

Location based search on Android

开发者 https://www.devze.com 2023-01-17 04:37 出处:网络
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 s

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消