【问题标题】:Getting location with the Google Play Services Location API vs getting it with the Awareness API使用 Google Play Services Location API 获取位置与使用 Awareness API 获取位置
【发布时间】:2017-01-25 12:19:06
【问题描述】:

我已经阅读了 Android 框架位置 API 和 Google Play 服务位置 API 之间的许多很好的比较。但是,与 Google Play Services Location API 相比,使用(专门用于获取位置)Google Play Services Awareness API 有什么好处吗?

【问题讨论】:

    标签: android google-location-services google-awareness


    【解决方案1】:

    这实际上取决于您的确切用例和要求。

    • 如果您只需要知道位置或希望定期接收位置更新,请使用LocationServices.FusedLocationApi

    • 如果您有更复杂的上下文要求,例如,您需要知道用户何时开始步行,或用户何时进入某个区域,或者基于用户的上下文的其他东西,您想使用 Awareness API。

    回答你的问题

    但是,与 Google Play Services Location API 相比,使用(专门用于获取位置)Google Play Services Awareness API 有什么好处吗?

    不,根本没有。 Awareness API 并不是专门为获取位置而创建的。 LocationServices.FusedLocationApi 是但是,所以使用它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-12-07
      • 2016-05-07
      • 2016-09-01
      • 2019-01-25
      • 1970-01-01
      • 1970-01-01
      • 2015-08-17
      • 2016-05-21
      相关资源
      最近更新 更多