The IMSI is used in any mobile network that interconnects with other networks, in particular CDMA and EVDO networks as well as GSM nets. This number is provisioned in the phone directly or in the R-UIM card (a CDMA analogue equivalent to a SIM card in GSM)
An IMSI is usually 15 digits long, but can be shorter (for example MTN South Africa's IMSIs are 14 digits). The first 3 digits are the Mobile Country Code, and is followed by the Mobile Network Code (MNC), either 2 digits (European standard) or 3 digits (North American standard). The remaining digits are the mobile subscriber identification number (MSIN) within the network's customer base.
The IMSI conforms to the International Telecommunication Union (ITU) E.212 numbering standard.
Example
IMSI:404400021281732
MCC | 404 | India |
---|---|---|
MNC | 40 | Airtel |
MSIN | 0021281732 |
Code:
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
public class MobileProperties extends MIDlet implements CommandListener {
Form f = null;
Display dis = null;
Command ok = null;
Command exit = null;
public MobileProperties () {
dis=Display.getDisplay(this);
f = new Form(" Mobile Details ");
ok =new Command(" Ok",Command.OK,1);
exit =new Command(" Exit",Command.EXIT,2);
f.addCommand(ok);
f.addCommand(exit);
f.setCommandListener(this);
}
public void startApp(){
try {
f.append(" Nokia IMSI : " + System.getProperty("com.nokia.mid.imsi")+"\n");
f.append(" IMSI : " + System.getProperty("IMSI")+"\n");
} catch(Exception e) {
f.append("Exception :"+e);
}
dis.setCurrent(f);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
public void commandAction(Command c, Displayable s) {
if (c == ok) {
destroyApp(true);
notifyDestroyed();
} else if (c==exit) {
destroyApp(true);
notifyDestroyed();
}
}
}
No comments:
Post a Comment