スマホのSIMカードでAPDUを交換する必要があります。
キャリア (Rogers) の 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 をターゲットとして使用します。
また、私が申請書に署名したことにも注意してください。
ヒント/アドバイスをいただければ幸いです。