The database has to be updated along with the SDK as it's a part of it.
Migrating from v5.0 to v5.1
If you build an app with AndroidX, you have to enable the Jetifier plugin that automatically migrates existing third-party libraries to use AndroidX. See how.
Database
The database has to be updated along with the SDK as it's a part of it.
Show scanner
If the below error was encountered, make sure that the right context had been passed to the showScanner() method, i.e. it has to be the context of the activity rather than the application.
DocumentReader.DocumentReaderCompletion was changed to IDocumentReaderCompletion.
DocumentReader.DocumentReaderInitCompletion was changed to IDocumentReaderInitCompletion.
DocumentReader.DocumentReaderPrepareCompletion was changed to IDocumentReaderPrepareCompletion.
Migrating from v4.2 to v5.0
Dependencies
Make sure that the new common library is added to the project and presented in the External Libraries list, otherwise, you may encounter the following errors:
GT_DOCUMENT_REAR was removed and GT_DOCUMENT_FRONT was renamed to GF_DOCUMENT_IMAGE (see eGraphicFieldType enum). In order to get the appropriate document side you should use the new property pageIndex, which is available in DocumentReaderGraphicResult class, e.g. pageIndex = 0 - it’s the first (front) side of the document, pageIndex = 1 - it’s the second (back) side of the document:
// Get document side image (first page)
Bitmap documentImageFirstPage = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE, -1, 0);
// Get document side image (second page)
Bitmap documentImageSecondPage = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE, -1, 1);
// Get document side image (first page)
val documentImageFirstPage = results.getGraphicFieldImageByType(eGraphicFieldType.GF_PORTRAIT, -1, 0)
// Get document side image (second page)
val documentImageSecondPage = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE, -1, 0)