Cell ID positioning

From Java Runtime 1.0.0 for Series 40 onwards, MIDlets can use cell ID positioning to determine device location. A cell ID is the unique identifier of a base station within a mobile phone network. Cell ID positioning allows MIDlets to obtain approximate location information based on the base station within whose coverage area the device is located. Cell ID positioning is a network-based location-providing method and therefore does not require the device to have a built-in GPS module or a connection to an external GPS module. The device simply needs to be connected to a mobile phone network.

In cell ID positioning, the device sends the cell ID of the base station to which it is currently connected to the network, and the network returns the location information of that base station to the device. This communication flow is invisible to the MIDlet. The MIDlet only needs to specify that it uses cell ID positioning and then set up a listener for retrieving the corresponding location information. Developing a MIDlet that uses cell ID positioning is no different from developing a MIDlet that uses any other location-providing method.

The accuracy of cell ID positioning varies depending on the area where the device is located. You can typically expect the following values:

Table: Accuracy of cell ID positioning based on location

Location

Accuracy

Urban area

100-500 meters

Suburban area

500-1500 meters

Rural area

1500-10000 meters

To determine the location, the device exchanges a small amount of data with the network (roughly 5 Kb per request). This data exchange will likely incur a cost to the user, so make sure that your MIDlets notifies the user accordingly.

Determining device location using cell ID positioning

To determine device location using cell ID positioning, create a LocationProvider by using the LocationUtil.getLocationProvider method as follows:

// Specify the location-providing methods for cell ID positioning
int[] methods = {(MTA_ASSISTED | MTE_CELLID | MTE_SHORTRANGE | MTY_NETWORKBASED)};

// Retrieve the location provider
LocationProvider provider = LocationUtil.getLocationProvider(methods, null);

You can also obtain the current cell ID for the device by using the com.nokia.mid.cellid system property. However, using only the system property value, the MIDlet would have to separately implement the mechanism for converting the value to location information.