Ready-to-Use UI v.1.0 -> v.2.0
Introduction
The improved Document Scanner SDK RTU UI v.2.0 further streamlines the integration of our scanning functionalities into your mobile app and provides a tried and true user experience. It also adds several new features – most notably dedicated screens for scanning, reviewing, and editing documents. Thanks to in-depth configuration options, you can tailor the scanning flow to your use case.
If you are currently using RTU UI v.1.0 in your app, this guide will help you migrate to v.2.0.
Key concept differences
Document scanning flow
The new version of the Ready-to-Use UI provides not only separate scanning and cropping screens but also allows you to easily integrate the entire document scanning flow into your application.
The document scanning flow consists of the following screens combined in a single scanning process:
- Introduction Screen
- Scanning Screen
- Acknowledge Screen
- Review Screen
- Crop Screen
- Reorder Screen
You may also disable certain screens if they are unnecessary for your use case.
All screens are highly customizable, allowing you to adapt the UI to your app’s design and branding.
See more details in the Ready-to-Use UI page.
Document API
The new version of the Ready-to-Use UI introduces a new approach to handling scanned documents.
DocumentData
provides a structured way to represent and manage scanned documents and their associated data, ensuring every document is complete and properly formatted.
ScanbotSdkUiV2
exposes an API to create, modify and delete DocumentData
while startDocumentScanner
and startCroppingScreen
are used to start the Ready-to-Use UI.
DocumentData
contains pages represented as PageData
. Each page consists of an original image of the scan, various editing properties like cropping polygon, rotation and filters, some
metadata properties like the document detection status and the document quality analyzer result and a number of processed images in different stages.
The editing properties of each page can be used to manipulate its final document image in a non-destructive way.
The scanned pages can be organized (added, removed and moved) within the scanned document.
The scanned document automatically persists itself, including its pages and their images, on the disk, so that you can access and modify the scanned document, its pages and images across numerous app sessions. Various functions allow you to enumerate, load and delete your scanned documents.
Migration guide
Update Scanbot SDK version
The Document Scanner SDK RTU UI v.2.0 was introduced in version 6.1.0. To use the new RTU UI, you need to update the Scanbot SDK to version 6.1.0 or higher. You may find the latest version of the Scanbot SDK in the Changelog.
Document Scanner startDocumentScanner
migration
The configuration of the Ready-to-Use UI has changed. The new version of the Ready-to-Use UI is more flexible and allows you to configure the UI more easily.
Imagine you had the following DocumentScannerConfiguration
configuration for the Ready-to-Use UI v.1.0 startDocumentScanner
:
loading...
The new configuration for the Ready-to-Use UI v.2.0 looks like this:
loading...
Cropping Screen startCroppingScreen
migration
As well as the Document Scanner, the Cropping UI has been updated to version v.2.0. Even though you may use the review screen to call the cropping screen, you can also call the cropping screen separately.
The configuration of the Ready-to-Use UI has changed. The new version of the Ready-to-Use UI is more flexible and allows you to configure the UI more easily.
Imagine you had the following CroppingConfiguration
configuration for the Ready-to-Use UI v.1.0 startCroppingScreen
:
loading...
The new configuration for the Ready-to-Use UI v.2.0 looks like this:
loading...
Finder Document Scanner startFinderDocumentScanner
migration
Unlike in the Ready-to-Use UI v.1.0 where you could use a separate Finder Document Scanner, in the new version of the Ready-to-Use UI, you can use the DocumentScanningFlow
to configure the camera screen with the finder aspect ratio.
The configuration migration would then be similar to the Document Scanner configuration.
Imagine you had the following FinderDocumentScannerConfiguration
configuration for the Ready-to-Use UI v.1.0 startFinderDocumentScanner
:
loading...
The configuration for the Ready-to-Use UI v.2.0 would look like this:
loading...
Storage migration
To migrate the stored pages created with RTU UI v.1.0 and based on the legacy Page
objects to the new RTU UI v.2.0 DocumentData
model, you can use the provided migration functionalities.
During the migration process, the SDK takes the old metadata and original images and stores them in a new document, reapplying all the changes.
Take a look at the example below:
loading...
Want to scan longer than one minute?
Generate a free trial license to test the Scanbot SDK thoroughly.
Get your free Trial LicenseWhat do you think of this documentation?
What can we do to improve it? Please be as detailed as you like.