手机是否仅使用GPS来获取它的位置? [英] Is phone using only GPS to get it's location?

查看:95
本文介绍了手机是否仅使用GPS来获取它的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在进行测试,我们正在考虑Android手机和GPS设备的GPS位置,我们希望将其集成到我们的硬件中。但为了测试的准确性,手机只需要使用GPS,而不是手机信号塔和WiFi。



以下是代码,我设置了手机使用的服务。

  LocationManager locationManager =(LocationManager)getSystemService(LOCATION_SERVICE); 
locationManager
.requestLocationUpdates(LocationManager.GPS_PROVIDER,
MIN_MILLISECONDS_BEFORE_UPDATE_LOCATION,
MIN_METERS_BEFORE_UPDATE_LOCATION,
new MyLocationListener(this));

那么手机将只使用GPS来获取它的位置?我可以关闭WIFI,因为手机正在将当前位置发送到我们的数据库。在测试时,GPS设备和手机都位于固定位置。

我知道如何使用GPS获取位置已经有问题,但我想以确保该手机仅使用GPS。

解决方案

它只能使用GPS查找位置(假设位置可达,例如不是地下或类似的东西)通过使用互联网,它只是找到更快的位置。由于您的设备是静止的,您应该可以。



详细了解它 here

I am conducting test where we are compering GPS position of Android phone and GPS device which we would like to integrate in our hardware. But for the test to be accurate, phone need to use only GPS and not cell towers and WiFi.

Here is the code, where I set which service does the phone use.

LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
    locationManager
            .requestLocationUpdates(LocationManager.GPS_PROVIDER,
                    MIN_MILLISECONDS_BEFORE_UPDATE_LOCATION,
                    MIN_METERS_BEFORE_UPDATE_LOCATION,
                    new MyLocationListener(this));

So will phone use only GPS to get it's location? I can' turn WIFI off, because phones are sending current locations to our data base. Both GPS device and phone are on a fixed location at the time of test.

I know that there are already questions how to use GPS for acquiring location, but I would like to make sure, that phone is using just GPS.

解决方案

It can find location by only using GPS (Assuming that location is reachable, for example not underground or something like that) By using internet it just finds location faster. Since your device is stationary you should be ok.

Read more about it here.

这篇关于手机是否仅使用GPS来获取它的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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