0
我需要與智能手機上的SIM卡交換APDU。net.rim.device.api.smartcad.SmartCardNoCardPresentException當調用SmartCardReader.openSession()
我做了一個小測試功能,使用我的運營商的(羅傑斯)SIM卡來嘗試這個功能。
SmartCardReader[] allReaders = SmartCardReaderFactory.getInstalledReaders();
for(int readerIndex = 0; readerIndex < allReaders.length; ++readerIndex) {
try {
SmartCardReaderSession session = allReaders[readerIndex].openSession();
}
catch(Exception e) {
System.err.println(e.toString());
}
}
但我不斷收到SmartCardNoCardPresentException異常。
顯然,SIM卡存在(我可以用它來撥打電話),但isSmartCardPresent()返回false。
請注意,我沒有在模擬器上運行它,它只在真實手機上「運行」。我使用Torch 9810作爲目標。
另請注意,我已經簽署了我的申請。
任何提示/建議,將不勝感激。