【发布时间】:2023-03-18 13:45:01
【问题描述】:
Here谷歌说:
Google Play 服务位置 API 优于 Android 框架位置 API (android.location),可作为向您的应用添加位置感知的一种方式。如果您目前正在使用 Android 框架位置 API,强烈建议您尽快切换到 Google Play 服务位置 API。
谁能向我解释为什么(如果我)需要切换到新的 API?
【问题讨论】:
-
切换的原因之一是 Google Play 服务位置 API 比 Android 框架位置 API 更省电。
-
@ChintanSoni 我明白了,但有什么令人信服的理由不这样做吗?我正在努力做出决定,但出于某种原因我不想改回来。
-
有理由不这样做吗?如果您使用 FusedLocationPrividerApi,则需要提示用户在需要时升级 Google Play 服务。如果用户没有您的应用所需的版本,并且选择不升级,您的应用将无法获取任何位置信息。
标签: android google-play-services