开发者

Does network_provider in android require wifi/GPS/3g? Android help

Does the following piece of code

    mlocManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, mlocListener);

require WIFI/3G/GPS to give proper updates. When all these 3 are off on my pho开发者_高级运维ne i dont get any answer. i get lat and long as 0.0 and 0.0 ! Please help!

Thanks


Yes, the Network Provider will use all of the "cheap" methods to get your location. It will need the 3G/cell-phone service to triangulate your location.


To reply to an old question... yes, you need a data/internet connection. Network location is determined by the wifi hotspots (or specifcally the MAC addresses) and cell towers. This info is sent up to the internet (to what I assume to be some google server), which then compares it to a database that maps/converts the wifi hotspots and cell towers to a physical location. Without a data/internet connection, all the info you collect (eg cell towers or nearby wifi hotspots) are meaningless.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜