[英]Getting location with the Google Play Services Location API vs getting it with the Awareness API
我已经阅读了Android的框架位置API和Google Play服务位置API之间的许多很好的比较。 但是,相对于Google Play服务位置API,使用(专门用于获取位置)Google Play服务意识API有什么好处吗?
这实际上取决于您的确切用例和要求。
如果您只需要知道位置或想定期接收位置更新,请使用LocationServices.FusedLocationApi
。
如果您有更复杂的上下文要求,例如,您需要知道用户何时开始行走,或者用户何时进入某个区域,或者其他基于用户上下文的内容 ,则需要使用Awareness API。
回答你的问题
但是,相对于Google Play服务位置API,使用(专门用于获取位置)Google Play服务意识API有什么好处吗?
不,一点都没有。 意识API并不是专门为了获取位置而创建的。 但是,使用了LocationServices.FusedLocationApi
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.