Getting Cell ID in Java ME
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|write your reason here}}.
Article Metadata
Compatibility
Platform(s): Series 40 3rd Edition, FP1 and S60 3rd Edition, FP2
Article
Keywords: System.getProperty(), Nokia proprietary system properties
Created: jarmlaht
(14 May 2008)
Last edited: hamishwillee
(10 May 2012)
Contents |
Overview
This code snippet demonstrates how to get the mobile cell ID by using Nokia-proprietary system properties in Series 40 and S60 devices. Note that a different system property is used to get the cell ID in Series 40 and S60 devices:
Series 40 3rd Edition, FP1 (or newer):System.getProperty("Cell-ID")S60 3rd Edition, FP2 (or newer):
System.getProperty("com.nokia.mid.cellid")
Note: In Series 40 devices the MIDlet needs to be signed to a manufacturer or operator domain; otherwise the property will be null. Signing is not needed for S60 devices.
Source
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class CellIDMIDlet extends MIDlet implements CommandListener {
private Form form;
private Command exitCommand;
private String S40_cell_id; // Series 40 cell id property
private String S60_cell_id; // S60 cell id property
public void startApp() {
form = new Form("Getting Cell ID");
S40_cell_id = System.getProperty("Cell-ID");
S60_cell_id = System.getProperty("com.nokia.mid.cellid");
form.append("Series 40 devices: " + S40_cell_id + "\n");
form.append("S60 devices: " + S60_cell_id);
exitCommand = new Command("Exit", Command.EXIT, 1);
form.setCommandListener(this);
form.addCommand(exitCommand);
Display.getDisplay(this).setCurrent(form);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
public void commandAction(Command c, Displayable d) {
if (c == exitCommand) this.notifyDestroyed();
}
}
Postconditions
When the MIDlet is run in either a Series 40 or S60 device, a cell ID should be shown on the Form (one will have a numeric value and another will have 'null').


Italic textQuestion: since this feature seems quite new on both platforms, how comes it has not been implemented the same way ?
Answer by Nokia Developer Technical Support: This depends on the decision made by each platform individually, although there is alignment of Java ME features between the platforms which makes Java ME a viable option for application development. Unfortunately this alignment doesn't mean that all the features are equally available for both platforms. The reasoning here is more or less as follows: The S60 policy has been more of "open to new features" covering also runtimes on top of Symbian, Series 40 is Nokia proprietary (in effect, not as fully open as Symbian) platform and that also affects in the policy making of implemented features and how openly they are available for developers.
Contents
S40 cell-id operator manufacturer signing requirement
Will the requirement for signing the midlet to a manufacturer or operator domain still be true for S40 6th edition, which includes the Java Location API -- JSR 179?
Answer by Nokia Developer Technical Support: Yes, accordingly this Technical Solution article in Nokia Developer Knowledge Base: TSJ000964 - Series 40: System Properties in Operator and Manufacturer domain
With cell-ID available on S60, Blackberry, SonyEricsson, UIQ, PalmOS, isn't it time this made less restrictive on S40?
Answer by Nokia Developer Technical Support: As said above, Series 40 is a Nokia proprietary platform and unfortunately the policy for Cell-ID is still as defined on the Forum Nokia Technical Solution article above unless otherwise announced.
How to sign midlet to manufacturer domain?
This Wiki indicates that to be able to retrieve the cell-ID from an S40 handset using Java ME, the Midlet must be signed to the manufacturer domain.
How does a developer go about getting an application signed to the manufacturer domain.
A search here in the Nokia Wiki for "manufacturer signing" gave no results.
Answer by Nokia Developer Technical Support: unfortunately there is no way for 3rd party developers to submit their applications to be signed into manufacturer domain in Series 40.
Series 40 (S40) 6th Edition includes JSR-179. Cell-ID now?
The 6th Edition release of Nokia S40 includes JSR-179.
LBS Zone Announcement
Does this mean that the cell-ID can be accessed on 6th Edition phones without signing the app to the manufacturer or operator domain?
Answer by Nokia Developer Technical Support: No, here still applies this Technical Solution article in Nokia Developer Knowledge Base: TSJ000964 - Series 40: System Properties in Operator and Manufacturer domain
Getting Cell ID in J2ME for S60 5th Edition
May be someone interested to know that code for getting Cell ID for S60 3rd Edition FP2 also works on S60 5th Edition. (checked on 5800 Xpress Music).
Answer by Nokia Developer Technical Support: Yes this is correct, in S60 the Cell ID has been available starting from S60 3rd Edition, FP2 and therefore the support for it is also available in S60 5th Edition.
Phones this does not work on
E51 - Symbian OS 9.2, Series 60 v3.1 UI
Mohammad kaied -
Does not work on both S40 & S60mohammad_kaied 18:03, 25 July 2011 (EEST)
DileepKumar - Getting cellid for Nokia n95
This system.property does not work in nokia n95 mobileDileepKumar 14:15, 19 November 2011 (EET)
Laulavanya@gmail.com - System.getProperty("") problem
System.getProperty("microedition.amms.version") i used this code to check whether the optional package Advanced Multimedia Supplements (JSR-234) is support so its return 1.0" but System.getProperty("camera.resolutions"); and System.getProperty("camera.orientations") is return null and System.getProperty("supports.mediacapabilities") returns audio3d music only in Nokia phones
why is it happening like this ?????????????? please give ans.............. is there any other way to get the camera properties( like camera resolution )laulavanya@gmail.com 08:31, 14 February 2012 (EET)