devnied / EMV-NFC-Paycard-Enrollment

A Java library used to read and extract data from NFC EMV credit cards (Android/PCSC).
Apache License 2.0
1.44k stars 586 forks source link

Call to IOUtils.closeQuietly with passed in tag not being recognised #15

Closed parky128 closed 8 years ago

parky128 commented 8 years ago

In HomeActivity.java of the sample app, there is a try\catch block when reading the card

                } finally {
                    // close tagcomm
                    IOUtils.closeQuietly(mTagcomm);
                }

I'm getting a build issue on the the call to closeQuietly where there is no overload that takes an isodep tag param, the other overloads such as taking a stream param are present. Where does this isodep overload come from?

devnied commented 8 years ago

An IsoDep implements the Closeable Interface so I use closeQuietly(Closeable closeable) form Apache CommonsIO. https://commons.apache.org/proper/commons-io/javadocs/api-2.4/org/apache/commons/io/IOUtils.html