【问题标题】:When to check Google Play Services in your app何时在您的应用中检查 Google Play 服务
【发布时间】:2018-12-22 13:41:47
【问题描述】:

我正在构建一个使用 Google 地图的应用。我正在关注 Google 的官方指南并转到此链接: https://developers.google.com/android/guides/setup

问题: 我是否需要检查地图的 Google Play 服务的可用性?

它很模糊,它没有说明哪些 API 需要这种检查。 谁能确认一下?

【问题讨论】:

    标签: android google-maps google-play-services


    【解决方案1】:

    一般来说,使用新模式访问 Google Play 服务 API (https://developers.google.com/android/guides/api-client),您无需预先检查可用性,因为GoogleApi 代表您的应用处理连接和可用性更新,包括那些需要用户交互的情况。

    即使使用较旧的GoogleApiClient,您也可以使用.enableAutoManage(...) 自动管理连接和错误解决方案。

    【讨论】:

      猜你喜欢
      • 2018-08-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-11
      • 1970-01-01
      • 2017-01-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多