Skip to content

Commit 4164caa

Browse files
authored
Merge pull request #407 from doo/acceptance_7.1.0
[EPIC-6074] acceptance DS 7.1.0
2 parents faad78b + f37b554 commit 4164caa

File tree

31 files changed

+1966
-474
lines changed

31 files changed

+1966
-474
lines changed

Libraries.txt

Lines changed: 212 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Open Source libraries used in the Scanbot SDK for Android version 7.0.3
1+
Open Source libraries used in the Scanbot SDK for Android version 7.1.0
22

33
CWAC-Camera
44

@@ -589,6 +589,217 @@ express Statement of Purpose.
589589
this CC0 or use of the Work.
590590

591591

592+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
593+
594+
flatbuffers
595+
596+
Version 2.0.6
597+
(https://github.com/google/flatbuffers/tree/master)
598+
599+
600+
Apache License
601+
Version 2.0, January 2004
602+
http://www.apache.org/licenses/
603+
604+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
605+
606+
1. Definitions.
607+
608+
"License" shall mean the terms and conditions for use, reproduction,
609+
and distribution as defined by Sections 1 through 9 of this document.
610+
611+
"Licensor" shall mean the copyright owner or entity authorized by
612+
the copyright owner that is granting the License.
613+
614+
"Legal Entity" shall mean the union of the acting entity and all
615+
other entities that control, are controlled by, or are under common
616+
control with that entity. For the purposes of this definition,
617+
"control" means (i) the power, direct or indirect, to cause the
618+
direction or management of such entity, whether by contract or
619+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
620+
outstanding shares, or (iii) beneficial ownership of such entity.
621+
622+
"You" (or "Your") shall mean an individual or Legal Entity
623+
exercising permissions granted by this License.
624+
625+
"Source" form shall mean the preferred form for making modifications,
626+
including but not limited to software source code, documentation
627+
source, and configuration files.
628+
629+
"Object" form shall mean any form resulting from mechanical
630+
transformation or translation of a Source form, including but
631+
not limited to compiled object code, generated documentation,
632+
and conversions to other media types.
633+
634+
"Work" shall mean the work of authorship, whether in Source or
635+
Object form, made available under the License, as indicated by a
636+
copyright notice that is included in or attached to the work
637+
(an example is provided in the Appendix below).
638+
639+
"Derivative Works" shall mean any work, whether in Source or Object
640+
form, that is based on (or derived from) the Work and for which the
641+
editorial revisions, annotations, elaborations, or other modifications
642+
represent, as a whole, an original work of authorship. For the purposes
643+
of this License, Derivative Works shall not include works that remain
644+
separable from, or merely link (or bind by name) to the interfaces of,
645+
the Work and Derivative Works thereof.
646+
647+
"Contribution" shall mean any work of authorship, including
648+
the original version of the Work and any modifications or additions
649+
to that Work or Derivative Works thereof, that is intentionally
650+
submitted to Licensor for inclusion in the Work by the copyright owner
651+
or by an individual or Legal Entity authorized to submit on behalf of
652+
the copyright owner. For the purposes of this definition, "submitted"
653+
means any form of electronic, verbal, or written communication sent
654+
to the Licensor or its representatives, including but not limited to
655+
communication on electronic mailing lists, source code control systems,
656+
and issue tracking systems that are managed by, or on behalf of, the
657+
Licensor for the purpose of discussing and improving the Work, but
658+
excluding communication that is conspicuously marked or otherwise
659+
designated in writing by the copyright owner as "Not a Contribution."
660+
661+
"Contributor" shall mean Licensor and any individual or Legal Entity
662+
on behalf of whom a Contribution has been received by Licensor and
663+
subsequently incorporated within the Work.
664+
665+
2. Grant of Copyright License. Subject to the terms and conditions of
666+
this License, each Contributor hereby grants to You a perpetual,
667+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
668+
copyright license to reproduce, prepare Derivative Works of,
669+
publicly display, publicly perform, sublicense, and distribute the
670+
Work and such Derivative Works in Source or Object form.
671+
672+
3. Grant of Patent License. Subject to the terms and conditions of
673+
this License, each Contributor hereby grants to You a perpetual,
674+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
675+
(except as stated in this section) patent license to make, have made,
676+
use, offer to sell, sell, import, and otherwise transfer the Work,
677+
where such license applies only to those patent claims licensable
678+
by such Contributor that are necessarily infringed by their
679+
Contribution(s) alone or by combination of their Contribution(s)
680+
with the Work to which such Contribution(s) was submitted. If You
681+
institute patent litigation against any entity (including a
682+
cross-claim or counterclaim in a lawsuit) alleging that the Work
683+
or a Contribution incorporated within the Work constitutes direct
684+
or contributory patent infringement, then any patent licenses
685+
granted to You under this License for that Work shall terminate
686+
as of the date such litigation is filed.
687+
688+
4. Redistribution. You may reproduce and distribute copies of the
689+
Work or Derivative Works thereof in any medium, with or without
690+
modifications, and in Source or Object form, provided that You
691+
meet the following conditions:
692+
693+
(a) You must give any other recipients of the Work or
694+
Derivative Works a copy of this License; and
695+
696+
(b) You must cause any modified files to carry prominent notices
697+
stating that You changed the files; and
698+
699+
(c) You must retain, in the Source form of any Derivative Works
700+
that You distribute, all copyright, patent, trademark, and
701+
attribution notices from the Source form of the Work,
702+
excluding those notices that do not pertain to any part of
703+
the Derivative Works; and
704+
705+
(d) If the Work includes a "NOTICE" text file as part of its
706+
distribution, then any Derivative Works that You distribute must
707+
include a readable copy of the attribution notices contained
708+
within such NOTICE file, excluding those notices that do not
709+
pertain to any part of the Derivative Works, in at least one
710+
of the following places: within a NOTICE text file distributed
711+
as part of the Derivative Works; within the Source form or
712+
documentation, if provided along with the Derivative Works; or,
713+
within a display generated by the Derivative Works, if and
714+
wherever such third-party notices normally appear. The contents
715+
of the NOTICE file are for informational purposes only and
716+
do not modify the License. You may add Your own attribution
717+
notices within Derivative Works that You distribute, alongside
718+
or as an addendum to the NOTICE text from the Work, provided
719+
that such additional attribution notices cannot be construed
720+
as modifying the License.
721+
722+
You may add Your own copyright statement to Your modifications and
723+
may provide additional or different license terms and conditions
724+
for use, reproduction, or distribution of Your modifications, or
725+
for any such Derivative Works as a whole, provided Your use,
726+
reproduction, and distribution of the Work otherwise complies with
727+
the conditions stated in this License.
728+
729+
5. Submission of Contributions. Unless You explicitly state otherwise,
730+
any Contribution intentionally submitted for inclusion in the Work
731+
by You to the Licensor shall be under the terms and conditions of
732+
this License, without any additional terms or conditions.
733+
Notwithstanding the above, nothing herein shall supersede or modify
734+
the terms of any separate license agreement you may have executed
735+
with Licensor regarding such Contributions.
736+
737+
6. Trademarks. This License does not grant permission to use the trade
738+
names, trademarks, service marks, or product names of the Licensor,
739+
except as required for reasonable and customary use in describing the
740+
origin of the Work and reproducing the content of the NOTICE file.
741+
742+
7. Disclaimer of Warranty. Unless required by applicable law or
743+
agreed to in writing, Licensor provides the Work (and each
744+
Contributor provides its Contributions) on an "AS IS" BASIS,
745+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
746+
implied, including, without limitation, any warranties or conditions
747+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
748+
PARTICULAR PURPOSE. You are solely responsible for determining the
749+
appropriateness of using or redistributing the Work and assume any
750+
risks associated with Your exercise of permissions under this License.
751+
752+
8. Limitation of Liability. In no event and under no legal theory,
753+
whether in tort (including negligence), contract, or otherwise,
754+
unless required by applicable law (such as deliberate and grossly
755+
negligent acts) or agreed to in writing, shall any Contributor be
756+
liable to You for damages, including any direct, indirect, special,
757+
incidental, or consequential damages of any character arising as a
758+
result of this License or out of the use or inability to use the
759+
Work (including but not limited to damages for loss of goodwill,
760+
work stoppage, computer failure or malfunction, or any and all
761+
other commercial damages or losses), even if such Contributor
762+
has been advised of the possibility of such damages.
763+
764+
9. Accepting Warranty or Additional Liability. While redistributing
765+
the Work or Derivative Works thereof, You may choose to offer,
766+
and charge a fee for, acceptance of support, warranty, indemnity,
767+
or other liability obligations and/or rights consistent with this
768+
License. However, in accepting such obligations, You may act only
769+
on Your own behalf and on Your sole responsibility, not on behalf
770+
of any other Contributor, and only if You agree to indemnify,
771+
defend, and hold each Contributor harmless for any liability
772+
incurred by, or claims asserted against, such Contributor by reason
773+
of your accepting any such warranty or additional liability.
774+
775+
END OF TERMS AND CONDITIONS
776+
777+
APPENDIX: How to apply the Apache License to your work.
778+
779+
To apply the Apache License to your work, attach the following
780+
boilerplate notice, with the fields enclosed by brackets "[]"
781+
replaced with your own identifying information. (Don't include
782+
the brackets!) The text should be enclosed in the appropriate
783+
comment syntax for the file format. We also recommend that a
784+
file or class name and description of purpose be included on the
785+
same "printed page" as the copyright notice for easier
786+
identification within third-party archives.
787+
788+
Copyright [yyyy] [name of copyright owner]
789+
790+
Licensed under the Apache License, Version 2.0 (the "License");
791+
you may not use this file except in compliance with the License.
792+
You may obtain a copy of the License at
793+
794+
http://www.apache.org/licenses/LICENSE-2.0
795+
796+
Unless required by applicable law or agreed to in writing, software
797+
distributed under the License is distributed on an "AS IS" BASIS,
798+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
799+
See the License for the specific language governing permissions and
800+
limitations under the License.
801+
802+
592803
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
593804

594805
gs1-syntax-dictionary

classic-components-example/barcode-scanner/src/main/java/io/scanbot/example/ui/BarcodeScannerViewActivity.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import io.scanbot.sdk.barcode.ui.BarcodeScannerView
2828
import io.scanbot.sdk.barcode.ui.IBarcodeScannerViewCallback
2929
import io.scanbot.sdk.camera.CaptureInfo
3030
import io.scanbot.sdk.camera.FrameHandlerResult
31-
import io.scanbot.sdk.ui.camera.CameraUiSettings
3231

3332
class BarcodeScannerViewActivity : AppCompatActivity() {
3433
private lateinit var barcodeScannerView: BarcodeScannerView
@@ -52,7 +51,7 @@ class BarcodeScannerViewActivity : AppCompatActivity() {
5251
} )
5352

5453
barcodeScannerView.apply {
55-
initCamera(CameraUiSettings(false))
54+
initCamera()
5655
initScanningBehavior(scanner,
5756
{ result ->
5857
if (result is FrameHandlerResult.Success) {

classic-components-example/barcode-scanner/src/main/java/io/scanbot/example/ui/DetailedItemDataActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class DetailedItemDataActivity : AppCompatActivity() {
7474
is BoardingPass -> {
7575
barcodesResult.append("\n")
7676
.append("Boarding Pass Document\n")
77-
.append("${barcodeDocumentFormat.name}\n")
77+
.append("${barcodeDocumentFormat.passengerName}\n")
7878
barcodeDocumentFormat.legs?.forEach { leg ->
7979
leg.document.fields.forEach {
8080
barcodesResult.append("${it.type.name}:${it.value}\n")

classic-components-example/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ allprojects {
1515

1616
jvmToolchainVersion = 17
1717

18-
scanbotSdkVersion = "7.0.3"
18+
scanbotSdkVersion = "7.1.0"
1919

2020
androidCoreKtxVersion = "1.6.0"
2121
constraintLayoutVersion = "2.0.4"

classic-components-example/check-scanner/src/main/java/io/scanbot/example/AutoSnappingCheckRecognizerActivity.kt

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -111,32 +111,23 @@ class AutoSnappingCheckScannerActivity : AppCompatActivity() {
111111
private fun processPictureTaken(image: ByteArray) {
112112
val options = BitmapFactory.Options()
113113
val originalBitmap = BitmapFactory.decodeByteArray(image, 0, image.size, options)
114-
115-
val documentScanner = scanbotSDK.createDocumentScanner()
116-
val result = documentScanner.scanFromBitmap(originalBitmap)
117-
118-
result?.pointsNormalized?.let { polygon ->
119-
ImageProcessor(originalBitmap).crop(polygon).processedBitmap()
120-
?.let { documentImage ->
121-
// documentImage will be recycled inside scanCheckBitmap
122-
val imageCopy = Bitmap.createBitmap(documentImage)
123-
val checkScanner = scanbotSDK.createCheckScanner()
124-
val checkResult = checkScanner.scanFromBitmap(documentImage, 0)
125-
if (checkResult?.check != null) {
126-
CheckScannerResultActivity.tempDocumentImage = imageCopy
127-
startActivity(CheckScannerResultActivity.newIntent(this, checkResult))
128-
} else {
129-
runOnUiThread {
130-
Toast.makeText(
131-
this,
132-
"Check is not found - please, try agian",
133-
Toast.LENGTH_LONG
134-
).show()
135-
}
136-
}
137-
}
114+
// documentImage will be recycled inside scanCheckBitmap
115+
val checkScanner = scanbotSDK.createCheckScanner()
116+
val checkResult = checkScanner.scanFromBitmap(originalBitmap, 0)
117+
if (checkResult?.check != null) {
118+
CheckScannerResultActivity.tempDocumentImage = checkResult.croppedImage?.toBitmap()
119+
startActivity(CheckScannerResultActivity.newIntent(this, checkResult))
120+
} else {
121+
runOnUiThread {
122+
Toast.makeText(
123+
this,
124+
"Check is not found - please, try agian",
125+
Toast.LENGTH_LONG
126+
).show()
127+
}
138128
}
139129

130+
140131
// continue scanning
141132
cameraView.postDelayed({
142133
cameraView.continuousFocus()

classic-components-example/check-scanner/src/main/java/io/scanbot/example/MainActivity.kt

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,23 @@ class MainActivity : AppCompatActivity() {
2828

2929
private val binding by lazy { ActivityMainBinding.inflate(layoutInflater) }
3030

31-
private val selectGalleryImageResultLauncher = registerForActivityResult(ActivityResultContracts.PickVisualMedia()) { uri ->
32-
if (!scanbotSdk.licenseInfo.isValid) {
33-
this@MainActivity.showToast("1-minute trial license has expired!")
34-
Log.e(Const.LOG_TAG, "1-minute trial license has expired!")
35-
return@registerForActivityResult
31+
private val selectGalleryImageResultLauncher =
32+
registerForActivityResult(ActivityResultContracts.PickVisualMedia()) { uri ->
33+
if (!scanbotSdk.licenseInfo.isValid) {
34+
this@MainActivity.showToast("1-minute trial license has expired!")
35+
Log.e(Const.LOG_TAG, "1-minute trial license has expired!")
36+
return@registerForActivityResult
37+
}
38+
39+
if (uri == null) {
40+
showToast("Error obtaining selected image!")
41+
Log.e(Const.LOG_TAG, "Error obtaining selected image!")
42+
return@registerForActivityResult
43+
}
44+
45+
lifecycleScope.launch { scanCheck(uri) }
3646
}
3747

38-
if (uri == null) {
39-
showToast("Error obtaining selected image!")
40-
Log.e(Const.LOG_TAG, "Error obtaining selected image!")
41-
return@registerForActivityResult
42-
}
43-
44-
lifecycleScope.launch { scanCheck(uri) }
45-
}
46-
4748
override fun onCreate(savedInstanceState: Bundle?) {
4849
super.onCreate(savedInstanceState)
4950
setContentView(binding.root)
@@ -77,6 +78,7 @@ class MainActivity : AppCompatActivity() {
7778

7879
withContext(Dispatchers.Main) {
7980
result?.let {
81+
CheckScannerResultActivity.tempDocumentImage = it.croppedImage?.toBitmap()
8082
startActivity(CheckScannerResultActivity.newIntent(this@MainActivity, it))
8183
} ?: this@MainActivity.showToast("No data found!")
8284
}

classic-components-example/document-scanner/src/main/java/io/scanbot/example/DocumentCameraActivity.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import io.scanbot.sdk.document.DocumentScannerFrameHandler
2525
import io.scanbot.sdk.document.ui.DocumentScannerView
2626
import io.scanbot.sdk.document.ui.IDocumentScannerViewCallback
2727
import io.scanbot.sdk.process.ImageProcessor
28-
import io.scanbot.sdk.ui.camera.CameraUiSettings
2928
import io.scanbot.sdk.ui.camera.ShutterButton
3029
import io.scanbot.sdk.ui.view.base.configuration.CameraOrientationMode
3130

@@ -68,7 +67,7 @@ class DocumentCameraActivity : AppCompatActivity() {
6867
}
6968

7069
documentScannerView.apply {
71-
initCamera(CameraUiSettings(true))
70+
initCamera()
7271
initScanningBehavior(documentScanner,
7372
{ result ->
7473
// Here you are continuously notified about document scanning results.

classic-components-example/mrz-scanner/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ dependencies {
3939
implementation("io.scanbot:sdk-package-3:${project.ext.scanbotSdkVersion}")
4040
implementation("io.scanbot:rtu-ui-v2-bundle:${project.ext.scanbotSdkVersion}")
4141
implementation("io.scanbot:sdk-mrz-assets:${project.ext.scanbotSdkVersion}")
42+
implementation("io.scanbot:sdk-docqualityanalyzer-assets:${project.ext.scanbotSdkVersion}")
4243
}

0 commit comments

Comments
 (0)