为什么方法SimCardInfo.getImsi()在真机上会报错
代码是这样的,其他地方没有改。但在真机上打开却直接弹出一个异常(SecurityException),但在模拟器上可以获取,到底怎么回事啊?
public MyApp() { byte[] imsi = null; byte[] imei = null; imei = GPRSInfo.getIMEI(); try { imsi = SIMCardInfo.getIMSI(); } catch (SIMCardException e) { e.printStackTrace(); } MyScreen myScreen = new MyScreen(); myScreen.add(new LabelField("imsi : " + imsi + "imei : " + imei)); pushScreen(myScreen); }