Supporting offline scan
MobbScan allows you to scan documents without internet connectivity, with all the process performed on the device.
Extra configuration
In order to perform offline scans, you have to add some dependencies to your build.gradle
file (dependencies section).
Note: Please remember to change the versions for the ones available in the distribution file.
First off all, you have to include an extra library for the offline process.
... depencencies { ... implementation(name: 'mobbscan-offline-android', version: 'X.Y.Z', ext: 'aar') ... } ...
Then, add the corresponding dependencies for the countries you need to support offline. For instance, to support Spanish and Mexican documents, you should add:
... dependencies { ... implementation(name: 'mobbscan-offline-resources-esp', version: 'X.Y.Z', ext: 'aar') implementation(name: 'mobbscan-offline-resources-mex', version: 'X.Y.Z', ext: 'aar') ... } ...
Set API mode
Once all the dependencies have been set, you can set you API mode to offline
MobbScanAPI.getInstance().setApiMode(MobbScanAPI.MobbScanAPIMode.OFFLINE);
With all this, you can now proceed as a normal scan.
Note: Supporting Offline scan has been deprecated in 2.22.0 version. Changelog.