×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    1

    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

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: How i get cell id

    Hi,

    According to this article, 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 device specifications page you can see which devices would work. None of the 3 phones you mentioned is new enough to support cell ID retrieval.

  3. #3
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How i get cell id

    "In Series 40 devices the MIDlet needs to be signed to a manufacturer or operator domain; otherwise the property will be null."

    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.

  4. #4
    Registered User
    Join Date
    Jan 2004
    Location
    in my home :D
    Posts
    20

    Re: How i get cell id

    Quote Originally Posted by grahamhughes View Post
    "In Series 40 devices the MIDlet needs to be signed to a manufacturer or operator domain; otherwise the property will be null."

    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.
    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();
        }
    }
    fail to prepare, is prepare to fail !!

  5. #5
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    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.

  6. #6
    Registered User
    Join Date
    Jan 2004
    Location
    in my home :D
    Posts
    20

    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 ??
    fail to prepare, is prepare to fail !!

  7. #7
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How i get cell id

    Quote Originally Posted by Anerty View Post
    how my application can be signed by nokia or the operator ????
    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 Originally Posted by Anerty View Post
    and how i'va to do if i wonna to know the FP of my phone ??
    The device specification will tell you the Feature Pack number (or "initial release" if there is no feature pack).

    Graham.

  8. #8
    Registered User
    Join Date
    Sep 2009
    Posts
    14

    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

  9. #9
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    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.

  10. #10
    Registered User
    Join Date
    Sep 2009
    Posts
    14

    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

  11. #11
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    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 not give you the cell ID - on Series 40 this feature is available only to embedded applications.

    Graham.

  12. #12
    Registered User
    Join Date
    Nov 2012
    Posts
    5

    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

  13. #13
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,748

    Re: How i get cell id

    It may be a good idea to name a few devices providing hexadecimal numbers.

  14. #14
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    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 http://www.developer.nokia.com/Commu...on_via_Cell_ID
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Replies: 3
    Last Post: 2009-06-09, 16:25
  2. I have some question about Cell ID and Cell Name
    By clickzika in forum Symbian Networking & Messaging (Closed)
    Replies: 6
    Last Post: 2008-12-03, 14:46
  3. Cell IDs by cell phones
    By start_game316 in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2008-10-28, 09:23
  4. Replies: 4
    Last Post: 2008-10-14, 00:00
  5. Cell name
    By aaron1 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2003-09-01, 10:48

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×