Java 移动应用程序的地理位置?

发布于 2024-07-07 09:03:29 字数 183 浏览 6 评论 0原文

有没有一种方法可以使用 J2ME 应用程序以编程方式确定移动电话的大致地理位置,例如确定当前的小区? 这个问题尤其适用于不支持 GPS 的设备。

我不是在寻找一组地理坐标,而是在寻找用户定义特定于位置的软件行为的能力。

适用于任何硬件的解决方案将受到高度赞赏; 然而,解决方案越通用越好。 非常感谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

娇纵 2024-07-14 09:03:29

如果设备支持 JSR 179 位置 API,您可以使用此 API。 上次我研究这个问题时几乎没有任何设备支持它,但那是几年前的事了。

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.

不顾 2024-07-14 09:03:29

这是我在 stackoverflow 上发表的第一篇文章。

很多手机都可以通过System.getProperty(String arg)获取cellID(手机所连接的电线杆的id)
这里我有一个例子,尝试几个键来查看是否可以找到 cellID。 我已经在很多索尼爱立信手机上进行了测试,只要不是 P1 等 Symbian 手机,它就可以正常工作。 如果您搜索网络,您可能会找到更多按键来查找 motorola、samsung 等的 cellID:s。

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

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 = "";
}
狼性发作 2024-07-14 09:03:29

我不相信有通用的 J2ME API 用于确定位置。

我确实知道黑莓有一个特定的 API,不仅可以检索粗略的“小区”位置,还可以检索 GPS API。

恐怕目前GPS解决方案是制造商专有的。

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.

似狗非友 2024-07-14 09:03:29

我浏览了很多应用程序下载网站,但没有找到任何::
但我确信对此的一些研究可以帮助您使用 J2ME API 构建自己的应用程序。
由于DAN给出的代码给出了基站编号。 您可以识别该小区能够对应的最近的车站。 实际上,一个单元能够同时捕获至少 6 个站点,因此,正如 deamonkid 所解释的那样,只要您有您所在地区或城市的地理参考地图,就可以使用多边定位来估算位置。 该应用程序将计算距最近的塔的距离和方向,并且地图上已经有该基站的坐标。 这样你就可以计算出空间坐标(估计)suresh。
这样你就可以得到100米的精度。
这可能需要信号强度测量应用程序,您可以下载该应用程序。
现在,如果您可以基于此生成代码,请分享。 我也对此进行了广泛的研究。 祝苏雷什一切顺利

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

浪荡不羁 2024-07-14 09:03:29

IMO,没有任何应用程序能够单独做到这一点。 它将需要卫星或手机外壳(手机信号塔)的帮助来测量手机当前所在的位置,同样精确到大约 30-50 米。
定位手机

这里的计算将由蜂窝塔或卫星中的软件完成。 您的应用程序只会发出请求,然后接收作为响应发送过来的数据。

同样,您将使用的 API 将是由手机公司或卫星服务提供的 API。 这些几乎从来都不是免费的。 我不确定他们是否也将其出售给普通用户。 也许只有像黑莓之类的大公司。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文