newlogic / smartscanner-core

ID scanning Android app and library. Supports MRZ, NFC, Barcodes, and ID PASS Lite cards.
Apache License 2.0
72 stars 19 forks source link

Add flag to read e-passport photo #70

Closed typelogic closed 3 years ago

typelogic commented 3 years ago

Current Behaviour

The reading of the photo content inside DG2 is the most time consuming portion during a read. Around 10 seconds is consumed to read this photo. If this photo is not needed, then it should be skipped.

Expected Behaviour

Use cases that does not need the ID photo should have a significantly faster NFC read. A flag should be used to control this read.

Steps to Reproduce the Problem

  1. Scan an e-passport/unified ID
  2. NFC scanning use case not needing a photo should be significantly faster than use case which need the photo.

Context

NFC scanning duration is an important usability and security feature.

typelogic commented 3 years ago

Submitted PR

I noticed that the code base has an allowance for situations it cannot read a data group due to unsatisfied permissions. Inserting the boolean flag along this flow results to a minimal change.