简体   繁体   中英

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 . As i understood it when reading this link

is that there are two ways of getting the location, either GPS_PROVIDER or NETWORK_PROVIDER . It says that NETWORK_PROVIDER only uses cell tower and Wi-Fi signals to get the location, so that is out. Now only GPS_PROVIDER remains BUT it does not state if it uses A-GPS or just stand alone GPS .

I have a hunch that using GPS_PROVIDER will automatically use A-GPS if an APN is set. Is this true? If so how can i ascertain that it is really using A-GPS instead of only GPS ? If it does not use A-GPS how can i make it use it?

/BR Dan

Assisted data is downloaded in the AGPS case. 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.

but...

This is not a standard, and is not always maintained by all GPS chipset OEMs from my experience. 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).

So the answer is - it depends on which phone you're using.

Assisted GPS is not a separate location provider; 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. Some devices, such as the Motorola Xoom, even use barometer readings.

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. This is the reason Android has the entire framework for querying for a provider based on other factors such as power consumption and accuracy.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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