regulaforensics / DocumentReader-Android

Android Framework for reading and validation of identification documents
64 stars 26 forks source link

error: cannot find symbol DocumentReaderCompletion #19

Closed JordiGamez closed 4 years ago

JordiGamez commented 4 years ago

Hello,

Today, when compiling my project using Regula for more than three years, I have found this error:

ScreenNavigator.java:63: error: cannot find symbol
public static void openCameraScanScreen(FragmentActivity activity, DocumentReader.DocumentReaderCompletion completion) {
symbol:   class DocumentReaderCompletion
location: class DocumentReader
Screenshot 2020-06-06 at 08 47 42

And when I search inside the DocumentReader java class, the object DocumentReaderCompletion is not there. Instead there is an IDocumentReaderCompletion, so my question is...

I need to use IDocumentReaderCompletion instead of the current DocumentReaderCompletion?

I have searched the documentation but it's always saying to use DocumentReaderCompletion so I'm very confused at the moment because my code is saying something different than the guide.

That's in my grade.build file:

allprojects{
    repositories{
        maven {
            url "http://maven.regulaforensics.com/RegulaDocumentReader"
        }
    }
}
[...]
implementation 'com.regula.documentreader.mrz:core:+@aar'
implementation('com.regula.documentreader:api:+@aar') {
    transitive = true;
}
vyakimchik commented 4 years ago

Hello. Yes, you are right. We published the new version - 5.1. DocumentReader.DocumentReaderCompletion was changed to IDocumentReaderCompletion.

The demo project has been updated and the documentation too.

Link to the docs: https://docs.regulaforensics.com/android/migration-guide#completion.

JordiGamez commented 4 years ago

Thanks! I followed the documentation and now everything is compiling as expected. I tried searching the IDocumentReaderCompletion in Google but nothing showed regarding this migration... 😅