1
votes

Reading around Nokia forums, it seems that accessing the Cell ID and related information from Nokia S40 series phones is virtually impossible unless your MIDlet is signed, and even this would work only for S40 3rd Edition FP1 and above.

I tried the following on a Nokia S40 Dev Platform 2 phone, using Java ME:

System.getProperty("com.nokia.mid.cellid");

However the value returned was null.

Is there any workaround to this, can the cell ID be read by other methods, like Modem AT (I guess this will only work with a phone connected to the PC), SIM Application Toolkit or other?

2
I have the same problem if you have found the solution can you please provide a hint how can we do that ? - Hemant Metalia

2 Answers

2
votes

And even if it is S40 3rd Edition FP1 (or above) and signed - it has to be signed by Nokia! (really). I don't know about other workarounds, but I have also tried JSR-179 and failed to do this.

0
votes

I'm using LocationProvider class from the SDK. Here's my function:

public LocationProvider getCellIdLocationProvider() {
    try {
        int[] methods = {Location.MTA_ASSISTED | Location.MTE_CELLID
            | Location.MTE_SHORTRANGE | Location.MTY_NETWORKBASED};
        return LocationUtil.getLocationProvider(methods, null);
    } catch (LocationException e) {
        System.err.println("Failed to get cell id location provider.");
        return null;
    }
}

it's possible that you use GPS as well (if the device has it) by changing the methods with other options. Just make sure that in the device specs it has JSR 179.