【发布时间】:2017-11-28 04:34:36
【问题描述】:
我一直在通过将PlaceAutocompleteFragment 嵌入到我的活动中来使用Google Places API for Android Autocomplete Widget。这工作正常,但由于小部件的性能和缺少完整的Google Places API Web Service 中可用的 radius 过滤器,我的实现有几个缺点。
我想开始摆脱 Android 版 Google Places API 并改用 Google Places API Web 服务 来访问更广泛的过滤选项。但是,文档说明了以下内容:
注意:Google Places API 网络服务不适用于 Android 或 iOS 受限 API 密钥。
这意味着,我假设我必须在我的应用程序中使用受浏览器或服务器限制的 API 密钥,但在 Android 上,我认为这些选项不太理想,因为可能会窃取 API 密钥。
如何在我的 Android 应用程序中安全地使用浏览器 API 密钥?
【问题讨论】:
标签: android google-maps google-places-api google-maps-android-api-2