Anyline MRZ扫描仪在我的Android项目中显示错误的Dob

时间:2019-11-23 14:48:32

标签: android

我是Android开发的新手。我正在使用Anyline MRZ扫描仪扫描护照的一个Android项目,但显示DOB错误的年份表示如果我扫描护照后扫描了DOB(19-10-1978),则显示DOB(19-10-0078)。有人可以帮助我解决此问题

// code of SCAN MRZ ACTIVITY
        DateFormat dateFormat =android.text.format.DateFormat.getMediumDateFormat(getApplicationContext()); 
    LinkedHashMap identificationResult = new LinkedHashMap<>(); 
    if (identification.getDayOfBirthObject() == null) {
     if (identification.getDayOfBirth() != null && (!identification.getDayOfBirth().isEmpty())) 
     { 
     identificationResult.put(getResources().getString(R.string.mrz_date_of_birthday), getResources().getString(R.string.not_valid)); 
     }
     else { identificationResult.put(getResources().getString(R.string.mrz_date_of_birthday), getResources().getString(R.string.not_available)); }
     } else {
      identificationResult.put(getResources().getString(R.string.mrz_date_of_birthday), dateFormat.format(identification.getDayOfBirthObject()));
      }

0 个答案:

没有答案