Is android application able to retrieve location info from connected WiFi hotspot AP?

一笑奈何 提交于 2019-12-11 15:01:49

问题


Wanted to know how Lat/Long info will be retrieved for specific location where my mobile device is connected to one of the public WiFi hotspot AP. So, my program gets the data and pass on to find location info to originate E911 calls or sending location info for any calls made? if this possible, let us know how this can be done? are there any specific Android APIs to do so? Please provide the details if possible.


回答1:


You can't get location direction from WiFi hotspot (actually WiFi spot itself doesn't know where it's located).

However, there are databases which contains mapping between WiFi hotspot MAC address and locations. So, your application should get info about WiFi hotspot and after go to one of this databases.

As example, check this out: http://en.wikipedia.org/wiki/Skyhook_Wireless




回答2:


Location can be retrieved using various ways in android from GPS or from your internet access ( whether its wifi or 3G) the great thing is that in android the last location that was retrieved from any application on the device will be saved and you can actually compare your currently retrieved location with the previous to see if its better or more accurate.

Here is a link that can let you understand better how location works with android.



来源:https://stackoverflow.com/questions/14309437/is-android-application-able-to-retrieve-location-info-from-connected-wifi-hotspo

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