Geographical location from a Java mobile application?

Is there a way to programmatically determine the rough geographical position of a mobile phone using the J2ME application, for example, determining the current cell? This question especially applies to devices that do not support GPS.

I am not looking for a set of geographic coordinates, but an opportunity for the user to determine the behavior of software at a specific location.

A solution for any equipment will be highly appreciated; however, a more general solution is better. Many thanks!

+3
source share
5 answers

JSR 179 location API, . , , , .

+7

, stackoverflow.

cellID ( , ) System.getProperty(String arg) , , , cellID. SonyEricsson, , Symbian, P1 . , , , cellID: s Motorola, Samsung ..

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 = "";
}
+6

, J2ME API .

, BlackBerry API "" , API GPS.

, GPS .

0

IMO, . , , , , 30-50 . http://biblestudysite.com/triangulation.jpg

. , , .

, apis, , , sattellite. . , . , , , Blackberry .

0

, : , J2ME API.     , DAN, . , . 6 , , , . , . , () . 100 .    , , , , , .    , , , . .

0
source

Source: https://habr.com/ru/post/1698634/


All Articles