如何使用谷歌Places API的Web服务在android系统? [英] How to use Google Places API for Web Service in android?
问题描述
<一个href=\"https://maps.googleapis.com/maps/api/place/nearbysearch/json?rankby=distance&location=LATITUDE,LONGITUDE&rankBy=50000&types=grocery_or_supermarket&sensor=true&name=NAMESEARCH&key=SERVER_KEY\" rel=\"nofollow\">https://maps.googleapis.com/maps/api/place/nearbysearch/json?rankby=distance&location=LATITUDE,LONGITUDE&rankBy=50000&types=grocery_or_supermarket&sensor=true&name=NAMESEARCH&key=SERVER_KEY
如何使用这个链接返回JSON格式的结果,我已经有一个服务器密钥,但继续说,这个IP,网站或移动应用程序无权使用这个API密钥。
how to use this link to return json format for the results, I already have an Server Key but it keep saying that "This IP, site or mobile application is not authorized to use this API key."
推荐答案
要整合谷歌Places API的官方途径是通过Android实现。您可以使用 PlacePicker 这需要关心最,但如果你有需要的它不补,那么你可以只是地方自动填充集成到自己的UI。
The official way to integrate Google Places API is through the Android implementation. You could use the PlacePicker which takes care the most but if you have a need that it doesn't fill, then you could integrate just the Place Autocomplete to your own UI.
话虽如此,如果你会坚持直接在Android应用使用该服务的URL,那么你就需要配置的谷歌开发者控制台浏览器密钥。
Having said this if you would insist using the service url directly in an Android app, then you would need to configure a Browser Key in the Google Developer Console.
这篇关于如何使用谷歌Places API的Web服务在android系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!