Implementing Triangulation in android

旧时模样 提交于 2019-12-06 10:54:42

问题


Hi Guys: I am new to android. I am developing an application in android 2.2 to identify location of user by means of any available resources (GPS , Networks etc). I have done finding location through GPS and using SIM network along with internet. Now problem is want to locate device when no GPS and no internet is available. In this case I have to implement Triangulation. I know theory of concept of triangulation but to implement is realy a biggggggg deal to me. Will any body kindly guide me to sort out the problem? I have searched the web but could not find any solution.


回答1:


Since your phone already does this, I would recommend looking through the source and using their method. You do realize that is one of the benefits of open source, don't you?




回答2:


You are re-inventing the wheel.

UPDATE: To detect you location based on cell tower(s) you need to know it's location. There are two ways to do it:

  1. Request web-service (for example goople maps). Requires internet connection.
  2. Get cell location from local database. Requires big database to be stored locally so performance is likely to be low.



回答3:


I think that this thread will be quite usefull for you. If I understand your needs correctly, you need a way to triangulate a certain device let's say. The LINK here provides with a way to know the Longitude and Latitude of the device, based on it's last known location (chances are the divice being connected at some point in the past to anything like GPS or some Network). This is something that you can put inside the code to determine the last known location, even if it was set 5 seconds ago by any of the above mentioned providers of such. When you collect the Longitude and Latitude data, you can pretty much know where this thing is. The next stop should be an API or Request web-service, as mentioned already (G.Maps) to pin-point the locaton on the map. If you intend of doing something similar to G.Maps -it's something HUGE the least to say. If I were you, I would use an API like that to show the location and if you want to do something ith the map image, you can take a screenshot or whatever.

I hope I helped and sorry if I didn't understand what your intentions were.

Cheers



来源:https://stackoverflow.com/questions/4026625/implementing-triangulation-in-android

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