检查从融合的位置提供商提供的位置信息是从GPS [英] Check if provided location info from fused location provider is from GPS

查看:217
本文介绍了检查从融合的位置提供商提供的位置信息是从GPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用融合位置提供,如果​​我查询 location.getProvider()在我收到它的位置返回融合。我想检查融合提供者是否使用GPS或WiFi或既为它给我的位置。这可能吗?怎么样?

We are using fused location provider and if I query location.getProvider() on the location I'm receiving it returns fused. I would like to check whether the fused provider used GPS or Wifi or both for the location it gave me. is this possible? how?

推荐答案

的融合提供者不提供您的具体位置提供它只返回融合如你所说,如果你要听一个特定的供应商,你需要使用旧的的LocationManager

The fused provider does not provide you with the specific location provider it only returns fused as you said, if you want to listen for a specific provider you need to use the old LocationManager

这篇关于检查从融合的位置提供商提供的位置信息是从GPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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