AmosKorir / MRZ-Scanner

Android Library to Scan MRZ code
22 stars 1 forks source link
mrz mrz-scanner

MRZ Scannner

🚧 🚧 🚧 __🚧 - Ongoing Construction

Android Library for scanning document MRZ documents.

Current Supported documents

  1. Nation ID
  2. Passport ->development

Installation

Add the Following to your gradle file.

      //add jitpack
        allprojects {
            repositories {
              ...
              maven { url 'https://jitpack.io' }
            }
          }

          //add dependency, check on the lastest release tag
        implementation 'com.github.AmosKorir:mrz_scanner:Tag'

How to start reading

     MrzBuilder(this, this.activityResultRegistry)
            .setOnCardDetailsResponse(object : CardDetailResponse {
                override fun onCardRead(card: IdData) {
                    Toast.makeText(this@MainActivity, card.toString(), Toast.LENGTH_SHORT).show()

                }

                override fun onCardReadingCancelled() {
                    Toast.makeText(this@MainActivity, "Cancelled", Toast.LENGTH_SHORT).show()
                }

                override fun onFailed(e: Exception) {
                    Toast.makeText(this@MainActivity, e.toString(), Toast.LENGTH_SHORT).show()
                }

            })
            .start()

⚙️ ⚙️ ⚙️ ⚙️ MRZ reading Algorithms

Depend on a jar that is currently maintained in a separate private repository