代码取自 developer.nokia.com
public String getIMSI() {
String out = "";
try {
out = System.getProperty("IMSI");
if (out == null || out.equals("null") || out.equals("")) {
out = System.getProperty("phone.imsi");
}
if (out == null || out.equals("null") || out.equals("")) {
out = System.getProperty("com.nokia.mid.mobinfo.IMSI");
}
if (out == null || out.equals("null") || out.equals("")) {
out = System.getProperty("com.nokia.mid.imsi");
}
if (out == null || out.equals("null") || out.equals("")) {
out = System.getProperty("IMSI");
}
if (out == null || out.equals("null") || out.equals("")) {
out = System.getProperty("imsi");
}
} catch (Exception e) {
return out == null ? "" : out;
}
return out == null ? "" : out;
}
但这需要津贴,因此您必须使用诺基亚证书 afaik 签名。并将 MiDLET-Permission 设置为 com.nokia.mid.mobinfo.IMSI
你可能想试试
String mcc = System.getProperty("com.nokia.mid.countrycode");
String mns = System.getProperty("com.nokia.mid.networkid");
相反,iirc那些更容易阅读