-
How i get cell id
Hello,
We are developing an application in J2ME and we need to get the current cell id. We have seen many snippets
for retrieving the cell id and we have tested them in many nokia phone but none of them worked.
We read somewhere that the application needs to be signed in order to work.
We tested the application in Nokia 3109, Nokia 6288 and Nokia 6230; our phone operator is Vodafone Italy.
What can we do to get this cell id?
Thanks,
Best regards
Filippo Albertini
-
Re: How i get cell id
Hi,
According to [url="http://wiki.forum.nokia.com/index.php/CS000947_-_Getting_Cell_ID_in_Java_ME"]this article[/url], getting Cell ID is only possible for Series 40 3rd Edition, FP1 (or newer) (signed) and S60 3rd Edition, FP2 (or newer) (not necessarily signed). Looking at the [url="http://www.forum.nokia.com/devices/matrix_all_1.html"]device specifications page[/url] you can see which devices would work. None of the 3 phones you mentioned is new enough to support cell ID retrieval.
-
Re: How i get cell id
[i]"In Series 40 devices the MIDlet needs to be signed to a manufacturer or operator domain; otherwise the property will be null."[/i]
Which means, unless you are developing this application specifically for Nokia or for Vodafone Italy, you cannot get the Cell ID on any Series 40.
Cheers,
Graham.
-
Re: How i get cell id
[QUOTE=grahamhughes;567387][i]"In Series 40 devices the MIDlet needs to be signed to a manufacturer or operator domain; otherwise the property will be null."[/i]
Which means, unless you are developing this application specifically for Nokia or for Vodafone Italy, you cannot get the Cell ID on any Series 40.
Cheers,
Graham.[/QUOTE]
so, they will NOT work on my 6280, but they dont also work on N73 !!
and also we can find a source code propulsed by nokia and they integred S40 :
[CODE]
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();
}
}
[/CODE]
-
Re: How i get cell id
I'm not sure what you're asking.
Going back to what Bogdan wrote:
In Series 40, Cell ID was added in 3rd Edition FP1 (6280 is 3rd Edition, no FP), and only works if your application is signed by Nokia or the network operator.
In Series 60, Cell ID was added in 3rd Edition FP2 (N73 is 3rd Edition, no FP).
So, neither of your devices support this functionality.
Graham.
-
Re: How i get cell id
ah, ok, i understand
how my application can be signed by nokia or the operator ????
and how i'va to do if i wonna to know the FP of my phone ??
-
Re: How i get cell id
[QUOTE=Anerty;615551]how my application can be signed by nokia or the operator ????[/QUOTE]
This is not going to happen. It is a facility available to Nokia and to the network operator only.
Also, it would not help you with the devices you have, since they do not support this feature.
[QUOTE=Anerty;615551]and how i'va to do if i wonna to know the FP of my phone ??[/QUOTE]
The device specification will tell you the Feature Pack number (or "initial release" if there is no feature pack).
Graham.
-
Re: How i get cell id
Hello
After going through the forums, i found the following code. However while performing the build operation on Sun java wireless toolkit 2.5.2, it returns an error. I have provided the code used and the error shown. Could you please look into it and tell whats the problem.
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();
}
}
Error on build:
Project "CellIDMIDlet" loaded
Project settings saved
Building "CellIDMIDlet"
Error preverifying class org.microemu.applet.Main
java/lang/NoClassDefFoundError: java/applet/Applet
Build failed
Settings updated
Project settings saved
Thanks
-
Re: How i get cell id
What are you building this with? You have some microemu in your classpath when building, and you need to get rid of it.
Oh... if you have a problem, you're better to start one new thread for it, and not to tag it onto the end of several existing threads. You're more likely to get a useful response, and to keep the whole topic in one place.
Cheers,
Graham.
-
Re: How i get cell id
Hello
I tried again with the code i have specified before. Build is successful now. When i run the program, the emulator displays the following
Series 40 devices: null
S60 device: null
Will i get the values for the above if i try the program in the mobile phone - Nokia 5800(s60 5th edition) or Nokia 6600(s60 2nd edition). Will the network operators provide the gsm cell id in india.
Thanks
-
Re: How i get cell id
Please don't duplicate your posts all over the place. Keep them here.
5800, yes, I think you will get a cell ID. 6600, no you won't. The Wiki article you took that code from should tell you which devices will work and which will not. Note that Series 40 devices will [i]not[/i] give you the cell ID - on Series 40 this feature is available only to embedded applications.
Graham.
-
Re: How i get cell id
Hi Forum,
There are some JavaME devices in the market which give cellId, LAC values in hexadecimal format (decimal format is what most devices give).
How will I know before hand that this device gives me hexadecimal value as cellId? So that for those devices I selectively convert cellId, LAC into decimal format
Anybody faced this issue earlier?!!
Thanks
rj12info
-
Re: How i get cell id
It may be a good idea to name a few devices providing hexadecimal numbers.
-
Re: How i get cell id
If you looking for location based on Cell id - on support S40 devices you can get it via JSR 172, refer to [url]http://www.developer.nokia.com/Community/Wiki/Determining_Current_Location_via_Cell_ID[/url]