简体   繁体   English

Android位置与Google Play服务

[英]Android location vs Google Play Services

I've used both methods for my application and as expected I found Google Play Services to not only be more accurate but also a lot more stable and quicker. 我已经在我的应用程序中使用了这两种方法,并且正如预期的那样,我发现Google Play服务不仅更加准确,而且更加稳定和快捷。 My question however is to why this is. 但是我的问题是为什么。 I've read some differences between Android location and Google Play Services here and there, but I'd like to learn more about the underlying technologies used and why there is such a great difference in performance. 我已经读过了Android位置与Google Play服务之间的一些差异,但是我想了解更多有关所使用的基础技术以及为什么性能会有如此大差异的信息。

I hope someone can share an article with relevant information or share his or her own knowledge. 我希望有人可以分享具有相关信息的文章或分享他或她自己的知识。 Thanks in advance! 提前致谢!

Answer from Dhruvam Gupta on the question Singh provided: Dhruvam GuptaSingh提供的问题的回答:

The Google Location Services API, part of Google Play Services, provides a more powerful, high-level framework that automatically handles location providers, user movement, and location accuracy. 作为Google Play服务的一部分的Google Location Services API提供了更强大的高级框架,该框架可自动处理位置提供者,用户移动和位置准确性。 It also handles location update scheduling based on power consumption parameters you provide. 它还根据您提供的功耗参数处理位置更新计划。 In most cases, you'll get better battery performance, as well as more appropriate accuracy, by using the Location Services API. 在大多数情况下,通过使用Location Services API,您将获得更好的电池性能以及更合适的精度。

More detailed differences between the two apis Google Play Service Location API and Android Framework Location API can be found here 可以在此处找到两个API Google Play服务位置API和Android框架位置API之间的更详细的区别

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM