Tuesday, January 1, 2013

BlackBerry getting CellId,MNC,MCC,MAC,LAC


We can retrieve the CELLID,MAC,LAC,MAC,MCC ETC with the help of following code lines!!


                      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));

No comments:

Post a Comment