LocationManager使用FusedLocationProviderApi吗? [英] LocationManager uses FusedLocationProviderApi?

查看:610
本文介绍了LocationManager使用FusedLocationProviderApi吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在研究过程中,我意识到Android中有多种获取用户位置的方法.第一个解决方案是由LocationManager提供的,第二个解决方案是基于GooglePlay服务的FusedLocationProviderAPI.在互联网上,我只能找到教程和分别对它们进行说明.今天某人在工作中向我展示了他正在使用LocationManager以及在onLocationChanged-Method中接收到带有融合"提供程序的位置的条件.这是否意味着LocationManager也会从融合的API中收集位置信息(如果有)?我在网上找不到有关此内容的任何书面信息.

During researching I realized that there are different ways in Android to get the users location. First solution is by LocationManager and the second solution is FusedLocationProviderAPI, which is based on GooglePlay Services. In the internet I just could find tutorials & explanations of them separately. At work today somebody showed me that he is using LocationManager with Criterias that in the onLocationChanged-Method locations are received with the provider "fused". Does this mean that LocationManager also gather location information from fused API if available? I couldn't find any written information about that in the net.

希望有人可以澄清这一点.

Hopefully somebody can make this clear.

谢谢你, 鳍

推荐答案

LocationManager使用FusedLocationProviderApi吗?

LocationManager uses FusedLocationProviderApi?

否,FusedLocationProvider(FLP)在内部使用LocationManager.

No, FusedLocationProvider(FLP) uses LocationManager internally.

如果您想直接与提供商本身进行互动,则可以使用LocationManager.

If you wanna interact directly provider's itself, u can use LocationManager.

FLP将位置提供程序(例如gps,网络和传感器)包装在您的设备中.并提供您选择接收位置的方式

FLP wraps location providers like gps, network and sensors in your device. And provides you choose how you receive locations like

  • 更准确的结果,更多的电量使用
  • 以更少的功耗使用更少的准确结果

您还可以观看Google的视频 (12:12-14:42),很好的视觉解释.

Also u can watch Google's video (12:12 - 14:42), nice visual explanation.

这篇关于LocationManager使用FusedLocationProviderApi吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆