Search code examples
javaandroidnfcrfidacr122

External RFID reader on Android with JMRTD


Context

I have a Minix x88i Android computer (not relevant, but it's without internal NFC tech), connected to an external RFID reader (the ACR1252u from ACS). ACS provides an API for Android so I can communicate with my reader through my application. That works.

Goal

My goal is to be able to read ISO 14443 Type A cards ((Dutch) ID-cards and passports (aka ePassports)), and get the result in my application. The key to access these tags is the MRZ (Machine Readable Zone) visible on the ePassports, which can be hard-coded for now.

Problem

I'm a bit stuck on what my next step should be. I found the JMRTD API to help me access the ePassports, but I don't know how to use it after importing it in my application (mostly because I don't have a 'Tag' or 'Card' object or something). Applications I found using this either make use of importing javax.smartcardio.* or android.nfc.*, which both won't work in my Android application for a device without internal NFC.

Do I need to use JMRTD? No, if there are other libraries which do the same that I don't know about, please let me know!

You could help me by guiding me in the right direction on how to use JMRTD (or something else) for an Android application on a device without internal NFC, in combination with the ACR reader. A popular reader from them is the ACR122, if you have experience with that the chance is high that it will also apply for my reader! Or maybe you know of a project that does the same, so I can use that as a code example.

If I need to provide more information, please let me know. Thanks in advance!


Solution

  • Solved by extending the CardService class from SCUBA (dependecy from JMRTD) in my own class. Next I could create a PassportService from JMRTD, open it, select the application, perform authentication and read the data.