Question

Is there a way of programmatically determining a rough geographical position of a mobile phone using J2ME application, for example determining the current cell? This question especially applies to non-GPS enabled devices.

I am not looking for a set of geographical coordinates, but an ability for a user to define location specific software behaviours.

Solution for any hardware will be highly appreciated; however the more generic a solution is — the better. Many thanks!

Was it helpful?

Solution

If the device supports the JSR 179 location API, you can use this. Last time I looked into this hardly any devices supported it, but that was a few years back.

OTHER TIPS

this is my first post one stackoverflow.

You can get the cellID (The id of the phone pole that the mobile is connected to) on a lot of phones thru System.getProperty(String arg) Here i have an example that tries a few keys to see if a cellID can be found. I have tested this on a lot of SonyEricsson mobiles and it works fine, as long as it isn't a Symbian mobile like P1 and so on. If you search the net you probably could find a lot more keys to find cellID:s for motorola, samsung and so on.

try{
  String[] cellIDTags = {"com.sonyericsson.net.cellid", "phone.cid", "Siemens.CID", "CellID"};
  for(int i = 0; i < cellIDTags.length; i++){
    cellID = System.getProperty(cellIDTags[i]);
    if(cellID != null && cellID != ""){
      location.setCellId(cellID);
      break;
    }
  }
}catch(Exception e){
  cellID = "";
}

I don't believe there is a general J2ME API for determining location.

I do know that BlackBerry has a specific API for retrieving not only the rough 'cell' location, but also a GPS API as well.

I'm afraid, at the moment, the GPS solutions are proprietary by manufacturer.

I have browsed through many application download site , but didn't find any :: But i am sure some research on this could help you build your own application with J2ME API. As the code given by DAN gives the base station number. You can recognize the nearest station that the cell is able to correspond to . Actually a cell is able to capture at least 6 stations simultaneously , so as deamonkid explains multilateration can be used to approximate the position, provided you have a georeferenced map of your area or city. The application will calculate the distance and direction from the nearest tower and the map already has the coordinate of that base station . So you can calculate the spatial coordinate(estimated ) suresh. You may get the accuracy of 100 meters by this. This probably needs the signal strength measuring application which probably you may get to download. Now if you can generate code based on this please share. I am also into extensive research on this. Good luck suresh and all

IMO, no application will be able to do that by itself. It will need the help of a satellite or incase of a mobile phone, the cell towers, to traingulate the position where the cell phone is at currently, which again is accurate to around 30-50 meters. Locate phone

The calculation here will be done by the software in the Cell towers or the one in the satellite. Your application will only make a request and then recieve the data that is sent over in response.

Again, the apis that you will be using will be the ones that have been provided by the cell phone company or the sattellite service. These are almost never free. I'm not sure they sell it to oridinary users too. Only maybe the big companies like Blackberry or the like.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top