Code Monkey home page Code Monkey logo

ekyc-2's Introduction

Android KYC SDK, Read and Extract Documents, Face Detection and Extract Passport by NFC tag

This is an SDK to determine how to Extract document details by ML kit, Detect and extract Face by camera and How to extract and decrypt Passport details by NFC tag



ٰDemo Videos :



Download Sample APK


I've separated it into 3 major functionality

1- Face Detection by ML Kit

- Extract Face by front camera
- Check if just one face exists in the frame and it is in the correct area

2- Extract Document details

- Scan and extract Texts from documents by back camera
- Developer can define mandatory strings list (name, family or ...) to check

3- Extract Passport details by NFC tag

- Extract and Decrypt Passport details by NFC tag



Technologies

Full Kotlin, ML KIT, Camera, NFC reader, Junit/Espresso

Usage

1- Add EKYC library to your project

2- For Extract simple documents :

ExtractDocumentActivity.start(
    activity = this
)

3- For Extract documents with mandatory fields :

ExtractDocumentActivity.start(
    activity = this
    mandatoryFields = arrayListOf("name , family")
)

4- For face detection :

FaceDetectionActivity.start(this)

5- For Extract Passport by NFC tag :

GetDataForNFCEncryptionActivity.start(this)

6- For get the results :

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        super.onActivityResult(requestCode, resultCode, data)
        //face detection
        if (requestCode == KYC.FACE_DETECTION_REQUEST_CODE) {
            if (resultCode == Activity.RESULT_OK) {
                //face detected
                val fileAddress = data?.getStringExtra(IMAGE_URL)
                fileAddress.toast(this)
            }
        }

        //document extraction
        if (requestCode == KYC.SCAN_DOCUMENT_REQUEST_CODE) {
            if (resultCode == Activity.RESULT_OK) {
                val fileAddress = data?.getStringExtra(IMAGE_URL)
                val results = data?.getStringExtra(RESULTS)
                "$fileAddress $results".toast(this)
            }
        }
        //NFC extraction
        if (requestCode == KYC.SCAN_PASSPORT_NFC_RESULTS_REQUEST_CODE) {
            if (resultCode == Activity.RESULT_OK) {
                val results = data?.getSerializableExtra(RESULTS)
                "$results".toast(this)
            }
        }
    }



TEST/CI CD

Also I'm using GitHub Actions as CI/CD. As I defined before, If I push the codes into any branch except master/release, All tests will run, Then If all of them passed, one APK will be built and uploads into the Github actions artifact.

Android Architecture Android Architecture




AmirHossein Teymoori [email protected]

ekyc-2's People

Contributors

amirhossein-mobilityone avatar ateymoori avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.