Android:以编程方式访问已保存的Google地址 [英] Android: access saved google locations programmatically
问题描述
谷歌地图可以保存喜欢的地点,以方便以后访问......请参阅此处。
在需要输入位置的Android中,如果有一个API允许用户从已保存的最喜欢位置进行选择,通过一个选择器对话框或类似的东西。
我找不到这样的API ...在那里?我找到的最近的是这个和这个,但这些似乎不允许从您存储的位置进行拣选。
由于此答案显示可能通过Google Plus和Google Identity Platform API获取位置数据
使用Google的Plus平台/
Google Identity Platform,或者(除此之外),如果您拥有经过身份验证的用户,则可以使用
根据此处所述进行API调用(使用示例)以获取当前用户的任何
指定字段(包括currentLocation,
如果用户提供了
他们)。
查看此链接。
Google maps allows the possibility of saving favourite locations for ease of access later... see here.
In Android, where a location is required to be entered, it would be neat if there were an API to enable the user to choose from their already-saved favourite locations, e.g. via a picker dialog or something along those lines.
I can't find such an API... is there? The closest I've found is this and this, but these don't seem to allow picking from your stored locations.
Google/Android doesn't provide any public API to access the starred/frequent locations of a user and that data is only shared amongst the Google apps.
As this answer shows it might be possible to fetch location data via the Google Plus and Google Identity platform APIs
Alternatively (or in addition to), using Google's Plus Platform / Google Identity Platform, if you have an authenticated user, you can make an API call as described here (with examples) to get any of the specified fields for the current user (including currentLocation, organizations (including work) with addresses, if the user provided them).
Take a look at this link.
这篇关于Android:以编程方式访问已保存的Google地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!