简体   繁体   English

如果设置了APN,Android GPS_PROVIDER是否使用A-GPS?

[英]Does android GPS_PROVIDER use A-GPS if APN is set?

GPS on Android and im wondering how to set it to use A-GPS . Android GPS ,我想知道如何将其设置为使用A-GPS As i understood it when reading this link 据我了解,当阅读此链接时

is that there are two ways of getting the location, either GPS_PROVIDER or NETWORK_PROVIDER . 是有两种获取位置的方法, GPS_PROVIDERNETWORK_PROVIDER It says that NETWORK_PROVIDER only uses cell tower and Wi-Fi signals to get the location, so that is out. 它说NETWORK_PROVIDER仅使用基站信号塔和Wi-Fi信号来获取位置,因此就不存在了。 Now only GPS_PROVIDER remains BUT it does not state if it uses A-GPS or just stand alone GPS . 现在只有GPS_PROVIDER保留,但是如果使用A-GPS或只是单独使用GPS ,则不会声明。

I have a hunch that using GPS_PROVIDER will automatically use A-GPS if an APN is set. 我有一种预感,如果设置了APN则使用GPS_PROVIDER会自动使用A-GPS Is this true? 这是真的? If so how can i ascertain that it is really using A-GPS instead of only GPS ? 如果是这样,我如何确定它确实在使用A-GPS而不是仅使用GPS If it does not use A-GPS how can i make it use it? 如果不使用A-GPS ,我该如何使用它?

/BR Dan / BR丹

Assisted data is downloaded in the AGPS case. 在AGPS情况下,将下载辅助数据。 This contains data about satellites positions in the sky (among other things). 这包含有关天空中卫星位置的数据(以及其他信息)。 So you are sort of right. 所以你说的很对。 Assisted data will be downloaded whenever there is a valid data connection. 只要有有效的数据连接,就会下载辅助数据。 Even if you have a WiFi connection, assistance data ought to be downloaded over it. 即使您具有WiFi连接,也应该通过它下载辅助数据。

but... 但...

This is not a standard, and is not always maintained by all GPS chipset OEMs from my experience. 根据我的经验,这不是标准,也不是所有GPS芯片组OEM都始终维护。 Also some Carriers insist that a separate APN and PDP context should be used with SUPL (SUPL is the protocol by which this assistance data is downloaded). 另外,一些运营商坚持认为SUPL应该使用单独的APN和PDP上下文(SUPL是下载此辅助数据的协议)。

So the answer is - it depends on which phone you're using. 因此,答案是-这取决于您使用的手机。

Assisted GPS is not a separate location provider; 辅助GPS并非独立的位置提供者; it merely means that other sensors are used to facilitate a faster location fix. 它仅意味着使用其他传感器来促进更快的位置固定。

Cell tower IDs and WiFi SSIDs are used when Google location services are enabled to get an initial (general) idea where the user is. 启用Google位置服务以获取用户所在的初始(一般)想法时,将使用基站信号塔ID和WiFi SSID。 Some devices, such as the Motorola Xoom, even use barometer readings. 某些设备(例如Motorola Xoom)甚至使用气压计读数。

My guess is that, because it is not specified in the documentation, it is up to the device manufacturer what each provider actually uses at a hardware level. 我的猜测是,由于未在文档中进行指定,因此由设备制造商决定每个提供商在硬件级别上实际使用什么。

The actual implementation of both GPS_PROVIDER and NETWORK_PROVIDER is not guaranteed to be consistent across devices. 不能保证GPS_PROVIDER和NETWORK_PROVIDER的实际实现在设备之间是一致的。 This is the reason Android has the entire framework for querying for a provider based on other factors such as power consumption and accuracy. 这就是Android具有基于其他因素(例如功耗和准确性)来查询提供程序的整个框架的原因。

我认为目前还没有一种方法可以检测所使用的GPS技术的类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM