【问题标题】:Google Maps API Key Programmatically以编程方式使用 Google Maps API 密钥
【发布时间】:2017-10-25 18:08:56
【问题描述】:

AndroidManifest.xml 文件中需要 Google Maps API 密钥对我来说毫无意义。

没有办法在运行时以编程方式修改此文件吗?

因此,对于使用我的 Android 应用程序的每个客户端...我需要为每个客户端设置一个单独的构建过程,仅仅是因为 Google Maps API 密钥?

【问题讨论】:

  • So for each client that is using my Android App... I'm required to have a separate build process for each, just because of the Google Maps API Key? 不对
  • @Ibrahim ok.. 那么如何交换密钥呢?
  • 在 manifest 中声明 api 键使您能够在整个应用程序中使用具有相同 api 的 map,而无需为每个客户端生成 api。
  • 您可以在开发者控制台中看到这一点,如我的屏幕截图所示:imgur.com/a/shA0c
  • @aherrick 不,我没有高级计划。这是一个标准计划项目。看看developers.google.com/maps/faq#usage-limits。上面写着:“以下 API 没有使用限制:Google Maps Android API、Google Maps SDK for iOS、Google Maps Embed API”

标签: android google-maps google-maps-android-api-2


【解决方案1】:

您无法更新AndroidManifest.xml

但是,由于适用于 Android/iOS 的 Google 地图没有使用限制,因此无需更换密钥。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-17
    • 2011-03-27
    • 2011-11-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多