問題描述
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 再次被棄用,你必須使用 <一個 rel="nofollow noreferrer">GoogleApi 基于 API.
GoogleApiClient has been deprecated again, you have to use GoogleApi based APIs instead.
這篇關于LocationClient 與 LocationManager的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!