LocationClient vs LocationManager(LocationClient 与 LocationManager)
问题描述
LocationClient
和LocationManager
有什么区别.
它们之间的优缺点是什么(比如电池、精度)?
What is the pros and cons between them (like battery, accuracy)?
哪个更好用?
推荐答案
Location Manager
是Android SDK中引入的,可以作为android的特性使用.
Location Manager
was introduced in Android SDK and can be used as a feature of android.
Location Client
是 Google Play SDK 的一部分,并在最近的 Google IO 2013 中引入.
Location Client
is something that's part of Google Play SDK and is introduced in the recent Google IO 2013.
可以理解,由于 Location Client 是最新的,因此可以更有效地以最少的能量(电池消耗)和更高的准确度获取位置.
One can understand that since Location Client is the latest, it is more efficient in getting the location with minimal energy(battery drain) with greater accuracy.
更新: LocationClient 已弃用.您必须使用 GoogleApiClient.这里可以找到它的一个例子.
UPDATE: LocationClient is deprecated. You have to use GoogleApiClient. An example of it can be found here.
Google Play 服务团队已清理他们的代码并将 LocationClient 功能移至 GoogleApiClient.
Google Play Services Team has cleaned up their code and moved LocationClient functionality into GoogleApiClient.
相同的教程可在http://developer.android.com/training/location/retrieve-current.html
在以下链接中,您可以找到有关此主题的 IO 讨论http://www.youtube.com/watch?v=Bte_GHuxUGc
On following link you can find IO talk about this subject http://www.youtube.com/watch?v=Bte_GHuxUGc
再次更新
GoogleApiClient 再次被弃用,你必须使用 <一个 href="https://developers.google.com/android/reference/com/google/android/gms/common/api/GoogleApi" rel="nofollow noreferrer">GoogleApi 基于 API.
GoogleApiClient has been deprecated again, you have to use GoogleApi based APIs instead.
这篇关于LocationClient 与 LocationManager的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:LocationClient 与 LocationManager
基础教程推荐
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01