问题
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
- Cell ids may not be accurate to a distance of up to a km
- 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