Can I fetch position of mobile device in j2me having no GPS service using information from cell tower

为君一笑 提交于 2019-12-23 20:02:53

问题


Can I get a location of mobile devices from j2me programming having no GPS unit installed?

Can I obtain the location using cell tower info? I heard about triangulation method.

And gone through http://developers.sun.com/mobility/apis/articles/location/ doc

In this doc they have given code only for mobile phones having GPS application installed.

But what about the others which does not have GPS in them? How can they get the location?

update I got a link which answers my question: http://mobiforge.com/developing/story/adding-location-a-non-gps-phone-introducing-cellid


回答1:


You can get the ID of the nearest cell tower to you. The way this is fetched however differs from manufacturers. On Nokia phones, you can get it through something like these:

cellID   = System.getProperty("Cell-ID");
if (cellID == null)
    cellID   = System.getProperty("com.nokia.mid.cellid");

while on Sony Ericsson, you have this:

System.getProperty("com.sonyericsson.net.cellid");

Once you get the cell id, you can easily use the OpencellID API to retrieve more information (coordinates, and all that) about the id. The two challenge with this though is that

  1. Cell ids may not be accurate to a distance of up to a km
  2. The information may not be available on opencellid.org


来源:https://stackoverflow.com/questions/9821593/can-i-fetch-position-of-mobile-device-in-j2me-having-no-gps-service-using-inform

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