Off late, the Location Based Services are the talk of town and truly the potential for those services are enormous. But the limiting factor for the wide spread use of LBS is the means of delivering those services. The best means I would say is through their mobile phones, thanks to the ever increasing penetration of the mobiles and nowadays it is hard to find anyone who is not having a mobile phone. The issue here is the finding the location of the mobile phone to deliver the required services. Sure, there are phones with GPS but they are not widespread and the effective alternative would be to use the mobie phone network to find the location of the phone.
A GSM mobile phone keeps track of four parameters that can be used to find the approximate location of the mobile they are MCC (Mobile Country Code), MNC (Mobile Network Code), LAC (Location Area Code) and CellID. Combining these four paramenter you can zero in on mobile phone's location with an accuracy of 1KM (Urban areas) to 3KM (Sub-urban and rural areas), which is quiet sufficient for some Loaction Based Services.
There are some websites that collects the cellid's across the globe like
or you can sure hop into your vehicle and roam around the city to make your own database.
Now the gotchas, there is no way to extract the cellid information from most of the phones in the J2ME environment. But the sony ericsson has thoughtfully made the cellid information accessible in the J2ME environment, refer Page 72 of SE Developer Guidelines Document. But it will work only on Sony Ericsson phones that has JAVA Platform 7.3 and above.
Now, using the below APIs' you can get the CellID information in your J2ME Application
For Home Network
System.getProperty("com.sonyericsson.net.mcc");
System.getProperty("com.sonyericsson.net.mnc");
For current Network
System.getProperty("com.sonyericsson.net.cmcc");
System.getProperty("com.sonyericsson.net.cmnc");
System.getProperty("com.sonyericsson.net.cellid");
System.getProperty("com.sonyericsson.net.lac");
Now, there is a small but usefull application called Location Alarm written based on the cellID information. Try it out.
Post a comment if you have any queries.