【问题标题】:When to use LocationManager or Google Apis to get location何时使用 LocationManager 或 Google API 获取位置
【发布时间】:2016-05-21 01:38:04
【问题描述】:

LocationManager 类来获取位置,但你也可以使用Google Apis with LocationServices.API

现在我只想知道,在电量不足的情况下,用户在哪个国家/地区。

我应该使用哪个以及何时使用?

【问题讨论】:

标签: android google-api


【解决方案1】:

Google 建议您使用新的 Google Play 服务位置 API。

Google Play 服务位置 API 优于 Android 框架位置 API (android.location),可作为向您的应用添加位置感知的一种方式。如果您目前正在使用 Android 框架位置 API,强烈建议您尽快切换到 Google Play 服务位置 API。

来源:http://developer.android.com/training/location/index.html

【讨论】:

  • 虽然此链接可能会回答问题,但最好在此处包含答案的基本部分并提供链接以供参考。如果链接页面发生更改,仅链接答案可能会失效。 - From Review
  • 谢谢@sandrstar!编辑我的帖子。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-12-07
  • 1970-01-01
  • 2018-12-19
  • 1970-01-01
  • 2016-04-18
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多