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

时间秒杀一切 提交于 2019-12-19 16:53:13

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/6997169/does-the-phone-need-to-be-connected-to-the-internet-so-that-the-network-provider

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!