获取周边用户的当前位置的地方名单当前位置、名单、地方、用户

2023-09-12 06:28:41 作者:苦笑流年记忆

所以,我见过很多问题,关于这个在这里SO和其他论坛,但没有确定的答案。这似乎是这样一个基本的过程,所以我不明白为什么我找不到任何答案吧。

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.

在Android开发者文档 - http://developer.android.com/guide/topics/location/obtaining-user-location.html#Adjusting - 参见帮助用户决定去哪里的底部附近,他们给出的例子,你想提供附近的餐馆,商店和娱乐场所的名单,并建议修改根据用户订单位置。

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."

这个帖子 - 寻找附近的位置 - 建议使用外部的API。它没有任何意义,我认为谷歌的Andr​​oid API不包括这一功能,特别是考虑到上述方案中的及其的文档。

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.

其他帖子谈论使用地理codeR + getFromLocationName()。这看起来不正确或者看到如何它并没有真正觉得自己是一个搜索和它似乎也面向一个特定的地址。

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.

是从Android开发者文档能够在上面的例子中,使用了目前Android SDK做什么?我已经看到了它在许多应用程序做,我变得非常沮丧试图怪异的解决方案,没有得到任何地方。请帮我理解这是怎么回事。

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.

谢谢!

更新:是谷歌API的地方没有这样做的答案吗?这是一个Web服务,但它似乎像它正是我上面描述?如果我的路要走此,请让我知道。

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.

推荐答案

谷歌的API客户端库的Java(用于基于HTTP API)和谷歌的地方API(用于位置数据)是要走的路。

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

使用谷歌API的地方