<bdo id='cb0rH'></bdo><ul id='cb0rH'></ul>
        <legend id='cb0rH'><style id='cb0rH'><dir id='cb0rH'><q id='cb0rH'></q></dir></style></legend>

      1. <tfoot id='cb0rH'></tfoot>
        <i id='cb0rH'><tr id='cb0rH'><dt id='cb0rH'><q id='cb0rH'><span id='cb0rH'><b id='cb0rH'><form id='cb0rH'><ins id='cb0rH'></ins><ul id='cb0rH'></ul><sub id='cb0rH'></sub></form><legend id='cb0rH'></legend><bdo id='cb0rH'><pre id='cb0rH'><center id='cb0rH'></center></pre></bdo></b><th id='cb0rH'></th></span></q></dt></tr></i><div id='cb0rH'><tfoot id='cb0rH'></tfoot><dl id='cb0rH'><fieldset id='cb0rH'></fieldset></dl></div>

        <small id='cb0rH'></small><noframes id='cb0rH'>

      2. Android中如何知道定位模式是WIFI还是2G/3G基站?

        时间:2023-09-01

          <tbody id='l7UZj'></tbody>

        • <i id='l7UZj'><tr id='l7UZj'><dt id='l7UZj'><q id='l7UZj'><span id='l7UZj'><b id='l7UZj'><form id='l7UZj'><ins id='l7UZj'></ins><ul id='l7UZj'></ul><sub id='l7UZj'></sub></form><legend id='l7UZj'></legend><bdo id='l7UZj'><pre id='l7UZj'><center id='l7UZj'></center></pre></bdo></b><th id='l7UZj'></th></span></q></dt></tr></i><div id='l7UZj'><tfoot id='l7UZj'></tfoot><dl id='l7UZj'><fieldset id='l7UZj'></fieldset></dl></div>

            • <tfoot id='l7UZj'></tfoot>
            • <legend id='l7UZj'><style id='l7UZj'><dir id='l7UZj'><q id='l7UZj'></q></dir></style></legend>

              <small id='l7UZj'></small><noframes id='l7UZj'>

                  <bdo id='l7UZj'></bdo><ul id='l7UZj'></ul>
                  本文介绍了Android中如何知道定位模式是WIFI还是2G/3G基站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我们知道Android中有两种定位模式:GPS和网络.如果我们使用网络,那么Android可以使用WIFI或2G/3G基站定位.如果没有 GPS,我们可以简单地使用 LocationManager.NETWORK_PROVIDER 来获取位置数据.但是我们怎么知道模式是WIFI还是2G/3G基站呢?Android 没有为 WIFI 和信号塔提供单独的提供程序.

                  We know there are two positioning mode in Android: GPS and network. If we use network, then Android can use WIFI or 2G/3G cell tower to position. Without GPS, we can simply use LocationManager.NETWORK_PROVIDER to get the location data. But how can we know the mode is WIFI or 2G/3G cell tower exactly? Android doesn't provide separate providers for WIFI and cell tower.

                  我想到了一个方法.但我不确定它是否正确.请查看并发表意见:

                  I have thought a method. But I am not sure whether it is correct. Please review and give comments:

                  1. 查看能否获取WIFI热点列表.如果列表中没有任何内容,则必须使用手机信号塔.
                  2. 如果有一些WIFI热点,并且精度很高(<=100m),那么很可能使用了WIFI.如果准确率低,是否还在使用手机信号塔?

                  据我了解,WIFI定位的准确率是比较高的.但它的准确度的正常范围是多少?另一个问题,Android 是否同时使用 WIFI 和信号塔?如果是这样,那么在我的应用程序中,我可以认为它使用的是 WIFI,而不是手机信号塔.

                  In my understanding, the accuracy of WIFI positioning is relatively high. But what's the normal range of the accuracy for it? Another question, does Android use WIFI and cell tower at the same time? If it does, then in my application, I can think it use WIFI, not cell tower.

                  谢谢!

                  推荐答案

                  这是正确的,Android 并没有明确给出确定如何计算网络位置的方法.网络提供商的原则是收集设备上的所有相关数据,然后将其全部发送到谷歌服务器,在那里计算您的位置并将其发送回您.我不确定,但网络位置也可能使用加速度计/陀螺仪/罗盘数据来提高位置的准确性,尤其是当您连续计算位置时.所以我相信它可以同时使用手机信号塔和 Wifi 信息.

                  This is correct, Android does not explicitely give a way to determine how the network location is computed. The principle of the network provider is to collect all the relevant data on the device, and then send it all to the Google servers, where your location is computed and sent back to you. I am not sure, but the network location might also use the accelerometer/gyro/compass data to improve the accuracy of the location, especially when you compute your location continuously. So I believe it can use simultaneously cell tower and Wifi info.

                  您的准确度方法应该适用于大多数情况,但并非 100% 可靠.

                  Your accuracy method should work in most cases, but is not 100% reliable.

                  另一种可能性是关闭 wifi,计算第一个位置修复,然后再次打开并再次尝试.通过比较这两个位置及其准确度估计,您大概可以猜出 wifi 对您当前位置的定位引擎的影响.

                  Another possibility is to turn the wifi off, compute a first location fix, then turn it on again and give it another try. by comparing the two locations and their accuracy estimates, you can probably guess the influence of wifi on the location engine at your current location.

                  出于好奇,你为什么需要这个?

                  Out of curiosity, why do you need this for?

                  这篇关于Android中如何知道定位模式是WIFI还是2G/3G基站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:根据可用性在 gps 和网络提供商之间切换 下一篇:在 Google 地图上制作可点击的多边形(适用于 And

                  相关文章

                  最新文章

                  <i id='uKXOO'><tr id='uKXOO'><dt id='uKXOO'><q id='uKXOO'><span id='uKXOO'><b id='uKXOO'><form id='uKXOO'><ins id='uKXOO'></ins><ul id='uKXOO'></ul><sub id='uKXOO'></sub></form><legend id='uKXOO'></legend><bdo id='uKXOO'><pre id='uKXOO'><center id='uKXOO'></center></pre></bdo></b><th id='uKXOO'></th></span></q></dt></tr></i><div id='uKXOO'><tfoot id='uKXOO'></tfoot><dl id='uKXOO'><fieldset id='uKXOO'></fieldset></dl></div>

                  <small id='uKXOO'></small><noframes id='uKXOO'>

                  <tfoot id='uKXOO'></tfoot>
                    • <bdo id='uKXOO'></bdo><ul id='uKXOO'></ul>

                    1. <legend id='uKXOO'><style id='uKXOO'><dir id='uKXOO'><q id='uKXOO'></q></dir></style></legend>