Welcome to the CrackBerry Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 3 of 3
  1. elaltaico's Avatar
    CrackBerry Newbie

    Posts
    1 Posts
    Thread AuthorThread Author   #1  

    Default how to retrieve CellID, MNC, MCC and LAC

    Hello


    I do try to find Cell ID,MNC,MCC and LAC by using GPRSInfo.getCellInfo(). I compiled it with simulator and tried the program on three different Blackberry simulator(BlackBerry 8800-02, 9500 Vodophone, 9630) which I believe that they
    have GPS. Unforunately, all the values seem to equal to 0. I do not think my code is wrong. You can see the code below. Could you please tell me a way to see exact values of Cell ID, MNC, MCC and LAC? Do I need to find a real Blackberry telephone
    (which does support GPS) ? I can'T do it by using simulators? I would be so glad if you can assist me. Thank you in advance.


    The code that I use to find out Cell ID, MNC, MCC and LAC:

    Code:
       int CellId=GPRSInfo.getCellInfo().getCellId();
            int LAC=GPRSInfo.getCellInfo().getLAC();
            int MCC=GPRSInfo.getCellInfo().getMCC();
           int MNC=GPRSInfo.getCellInfo().getMNC();
    
           String CellId1=Integer.toString(CellId);
           String LAC1=Integer.toString(LAC);
           String MCC1=Integer.toString(MCC);
           String MNC1=Integer.toString(MNC);
    
    
           
           String CellId2 = System.getProperty("CellID");
           String LAC2 = System.getProperty("LocAreaCode");
           
        
            add(new RichTextField("Hello World!"));
          
            add(new RichTextField("Cell ID is="+CellId1));
            add(new RichTextField("LAC1 is="+LAC1));
            add(new RichTextField("MCC1 is="+MCC1));
            add(new RichTextField("MNC1 is="+MNC1));
            add(new RichTextField("MNC is="+MNC));
            add(new RichTextField("Cell ID2 is="+CellId2));
            add(new RichTextField("LAC2 is="+LAC2));
  2. AmigaDude's Avatar
    CrackBerry Abuser

    Posts
    281 Posts
    PIN
    42
    #2  

    Default

    Ahh, never mind... You are going after GPRS info not GPS info.
    Last edited by AmigaDude; 09-23-2009 at 06:22 PM. Reason: stupid answer
    AmigaDude on Crackb!
    The Answer is 42, but What is the Question?
  3. QuiteSimple's Avatar
    QuiteSimple

    Posts
    169 Posts
    #3  

    Default

    GPS has nothing to do with the info you are trying to get. The info is provided by the GSM operator, so you will need a real device to test on. And note that it will work with a GSM carrier, if you try with a CDMA one the results may vary

    And on the side note - it is worth checking the official blackberry dev forums (unfortunately I still cannot paste links, but you can just search for it )

    Cheers,

    QuiteSimple
    Last edited by QuiteSimple; 09-27-2009 at 03:51 PM.

Posting Permissions