Does the phone need to be connected to the interne

2019-02-21 18:33发布

Does the phone need to be connected to the internet all the time, so that the network provider can determine a location?

When I test my app on my phone, and in Settings->Location only Use wireless network is checked, and I am not connected to the internet via Wi-Fi, I can not get a location fix.

I know there was something that the network provider uses availability of cell tower, but I don't know how that works exactly and should I have full internet access.

Please someone make this clear for me.

2条回答
仙女界的扛把子
2楼-- · 2019-02-21 19:08

Yes, you need to be connected to the Internet in order to get correct network location fixes. At least most of the time.

The phone collects the following data (it does not need a connection to the Internet to do this):

  • nearby wifi information by scanning for wifi access points
  • nearby mobile cell information is available from the phone's cellular radio

The phone then sends this data to a server. The server uses this data to look in its database to determine the phone's most likely position. The server sends the location information back to the phone. This is all done using data connection via Internet (either mobile Internet or wifi).

Some implementations additionally download a small amount of the server's database to the phone (describing a small area around the phone's current position) so that the phone doesn't have to query the Internet all the time. However, once the phone has moved outside of this small area it will need to access the Internet to get correct locations again.

So, basically, without Internet connectivity you can't (reliably) use network location.

查看更多
祖国的老花朵
3楼-- · 2019-02-21 19:09

I would expect network location to work differently depending on the carrier. It will need connection to the network, and really I wouldn't be surprised if that's classified as a data connection.

You can figure it out yourself through experimenting, but that's probably what prompted the question.

To get a definitive answer you'd probably have to talk to someone from the carrier. If they have a developer program that'd be your best bet.

I hope that helps.

查看更多
登录 后发表回答