-->

Implementing Triangulation in android [closed]

2020-08-01 07:27发布

问题:

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:

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.


回答2:

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