Skip to content

vniu/android-id-card-reader

 
 

Repository files navigation

android-id-card-reader

ID card reader OCR for android

Usage

final Intent intent = OcrActivity.buildIntent().build(getApplicationContext());
startActivityForResult(intent, 1);

@Override
protected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == 1) {
        if (resultCode == Activity.RESULT_OK) {
            final IdCard idCard = (IdCard) data.getSerializableExtra(OcrActivity.EXTRA_ID_CARD);
            Log.i("HELLO", idCard.getFirstName());
        }
    }
}

Other options for the intent builder.

final Intent intent = OcrActivity.buildIntent()
    .skipChooseStep(PassportType.BULGARIAN_ID_CARD_OLD) //Skip choose step but provide the type of passport.
    .enableLogger(false)                                //Enable/disable the logging.
    .showTempResults(true)                              //Show temp results before capturing.
    .percentageToCapture(85)                            //When to take the text and continue.
    .build(getApplicationContext());

Depencies

  • Dagger 2
  • RxJava
  • Glide

Licence

The MIT License (MIT)

Copyright (c) 2015 Georgi Eftimov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

ID card reader OCR for android

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 56.4%
  • C++ 34.3%
  • Shell 3.2%
  • Java 3.1%
  • Roff 1.4%
  • HTML 1.2%
  • Other 0.4%