Get list of places surrounding user's current

2019-01-18 03:33发布

So, I've seen many questions about this here on SO and in other forums, but no definite answer. It seems like such a basic process, so I don't understand why I can't find any answers for it.

In the Android Developer documentation - http://developer.android.com/guide/topics/location/obtaining-user-location.html#Adjusting - near the bottom in the section "Helping the user decide on where to go", they give the example, "you're looking to provide a list of nearby restaurants, stores, and entertainment and the order of recommendations changes depending on the user location."

This post - finding nearby locations - suggests using external APIs. It doesn't make sense to me that Google's Android API would not include this functionality, especially given the above scenario in their documentation.

Other posts talk about using the GeoCoder + getFromLocationName(). This doesn't seem right either seeing as how it doesn't really feel like a search and it also seems geared toward a specific address.

Is the above example from the Android Developer documentation able to be done using the current Android SDK? I've seen it done in many apps and am getting very frustrated trying weird solutions that don't get anywhere. Please help me understand what's going on.

Thanks!

UPDATE: Is Google Places API not the answer for this? It is a web service, but it seems like the it does exactly what I've described above? If I am way off on this, please let me know.

2条回答
SAY GOODBYE
2楼-- · 2019-01-18 03:52

It doesn't make sense to me that Google's Android API would not include this functionality, especially given the above scenario in their documentation.

That is just a scenario for illustration purposes. There are no APIs in Android itself for finding locations of restaurants, etc.

Is the above example from the Android Developer documentation able to be done using the current Android ADK?

The ADK is for creating USB accessories and has nothing to do with locations, restaurants, etc.

查看更多
闹够了就滚
3楼-- · 2019-01-18 04:10

Google APIs Client Library for Java (for HTTP-based APIs) and Google Places API (for Places Data) is the way to go.

Using Google Places API

查看更多
登录 后发表回答