Skip to content

Commit 792c490

Browse files
author
ci-bot
committed
Updated projects
1 parent f4720eb commit 792c490

95 files changed

Lines changed: 5151 additions & 252 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1120-Without License/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ dependencies {
3737
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
3838

3939
implementation 'com.regula.btdevice:api:7.6.+@aar'
40-
implementation 'com.regula.documentreader.core:fullauthrfid:7.6.+@aar'
41-
implementation('com.regula.documentreader:api:7.6.+@aar') {
40+
implementation 'com.regula.documentreader.core:fullauthrfid:7.7.+@aar'
41+
implementation('com.regula.documentreader:api:7.7.+@aar') {
4242
transitive = true;
4343
}
4444
}

Advanced/DocumentReader-Kotlin/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ dependencies {
3939

4040
implementation 'com.regula.btdevice:api:7.6.+@aar'
4141
//noinspection GradleDynamicVersion
42-
implementation 'com.regula.documentreader.core:fullrfid:7.6.+@aar'
42+
implementation 'com.regula.documentreader.core:fullrfid:7.7.+@aar'
4343
//noinspection GradleDynamicVersion
44-
implementation('com.regula.documentreader:api:7.6.+@aar') {
44+
implementation('com.regula.documentreader:api:7.7.+@aar') {
4545
transitive = true
4646
}
4747

Advanced/DocumentReader-Kotlin/app/src/main/java/com/regula/documentreader/Helpers.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,6 @@ class Helpers {
10021002
"RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED" to 17,
10031003
"RPRM_RESULT_TYPE_BAR_CODES_TEXT_DATA" to 18,
10041004
"RPRM_RESULT_TYPE_BAR_CODES_IMAGE_DATA" to 19,
1005-
"RPRM_RESULT_TYPE_AUTHENTICITY" to 20,
10061005
"RPRM_RESULT_TYPE_EOS_IMAGE" to 23,
10071006
"RPRM_RESULT_TYPE_BAYER_IMAGE" to 24,
10081007
"RPRM_RESULT_TYPE_MAGNETIC_STRIPE" to 25,
@@ -1057,7 +1056,6 @@ class Helpers {
10571056
eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED -> "Visual OCR Extended"
10581057
eRPRM_ResultType.RPRM_RESULT_TYPE_BAR_CODES_TEXT_DATA -> "Barcodes Text Data"
10591058
eRPRM_ResultType.RPRM_RESULT_TYPE_BAR_CODES_IMAGE_DATA -> "Barcodes Image Data"
1060-
eRPRM_ResultType.RPRM_RESULT_TYPE_AUTHENTICITY -> "Authenticity"
10611059
eRPRM_ResultType.RPRM_RESULT_TYPE_EOS_IMAGE -> "EOS Image"
10621060
eRPRM_ResultType.RPRM_RESULT_TYPE_BAYER_IMAGE -> "Bayer Image"
10631061
eRPRM_ResultType.RPRM_RESULT_TYPE_MAGNETIC_STRIPE -> "Magnetic Stripe"

Advanced/DocumentReader-Kotlin/app/src/main/java/com/regula/documentreader/MainActivity.kt

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -367,17 +367,6 @@ class MainActivity : FragmentActivity(), Serializable {
367367
Helpers.setFunctionality(functionality)
368368
})
369369
rvData.add(Scan("Gallery (recognizeImage)", ACTION_TYPE_GALLERY))
370-
rvData.add(Scan("Recognize images with light type", ACTION_TYPE_CUSTOM) {
371-
startRecognizeImageWithLight()
372-
})
373-
374-
rvData.add(Section("Authenticator"))
375-
rvData.add(Scan("use Authenticator", ACTION_TYPE_SCANNER) {
376-
Instance().functionality().edit()
377-
.setUseAuthenticator(true)
378-
.setShowCameraSwitchButton(true)
379-
.apply()
380-
})
381370

382371
rvData.add(Section("Custom"))
383372
rvData.add(Scan("Manual multipage mode", ACTION_TYPE_MANUAL_MULTIPAGE_MODE) {
@@ -666,24 +655,6 @@ class MainActivity : FragmentActivity(), Serializable {
666655
}
667656
}
668657

669-
private fun startRecognizeImageWithLight() {
670-
// For FULL_AUTH processing you need to do implementation in gradle com.regula.documentreader.core:fullauthrfid
671-
// Add 'FullAuth' database to 'assets/Regula'
672-
val image1 = BitmapFactory.decodeResource(resources, R.drawable.white)
673-
val image2 = BitmapFactory.decodeResource(resources, R.drawable.uv)
674-
val image3 = BitmapFactory.decodeResource(resources, R.drawable.ir)
675-
val imageData1 = ImageInputData(image1, eRPRM_Lights.RPRM_LIGHT_WHITE_FULL)
676-
val imageData2 = ImageInputData(image2, eRPRM_Lights.RPRM_LIGHT_UV)
677-
val imageData3 = ImageInputData(image3, eRPRM_Lights.RPRM_Light_IR_Full)
678-
recognizeSerialImages(imageData1, imageData2, imageData3)
679-
}
680-
681-
private fun recognizeSerialImages(vararg imageInputData: ImageInputData) {
682-
loadingDialog = showDialog("Processing images")
683-
val recognizeConfig = RecognizeConfig.Builder(Scenario.SCENARIO_FULL_AUTH).setImageInputData(imageInputData).build()
684-
Instance().recognize(recognizeConfig, completion)
685-
}
686-
687658
companion object {
688659
var results: DocumentReaderResults? = null
689660
var isInitializedByBleDevice: Boolean = false

Advanced/DocumentReader-Kotlin/app/src/main/java/com/regula/documentreader/ResultsActivity.kt

Lines changed: 1 addition & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ import com.regula.documentreader.api.enums.eRFID_ErrorCodes.*
2929
import com.regula.documentreader.api.results.DocumentReaderComparison
3030
import com.regula.documentreader.api.results.DocumentReaderResults
3131
import com.regula.documentreader.api.results.DocumentReaderValidity
32-
import com.regula.documentreader.api.results.authenticity.DocumentReaderIdentResult
33-
import com.regula.documentreader.api.results.authenticity.DocumentReaderPhotoIdentResult
34-
import com.regula.documentreader.api.results.authenticity.DocumentReaderSecurityFeatureCheck
3532
import com.regula.documentreader.databinding.ActivityResultsBinding
3633
import com.regula.documentreader.databinding.FragmentResultsBinding
3734
import com.regula.documentreader.databinding.FragmentRvBinding
@@ -43,7 +40,6 @@ class ResultsActivity : AppCompatActivity() {
4340
private lateinit var resultsFragment: ResultsTabFragment
4441
private lateinit var compareFragment: ResultsTabFragment
4542
private lateinit var rfidFragment: ResultsTabFragment
46-
private lateinit var authFragment: ResultsTabFragment
4743
private var selectedTabIndex = 0
4844

4945
override fun onCreate(savedInstanceState: Bundle?) {
@@ -89,14 +85,6 @@ class ResultsActivity : AppCompatActivity() {
8985
R.id.results_compare_rfid
9086
)
9187
}
92-
3 -> {
93-
selectedTabIndex = 3
94-
replaceFragment(
95-
authFragment,
96-
this@ResultsActivity,
97-
R.id.results_compare_rfid
98-
)
99-
}
10088
}
10189
}
10290

@@ -108,11 +96,9 @@ class ResultsActivity : AppCompatActivity() {
10896
resultsGroupedAttributes = initResults()
10997
compareGroupedAttributes = initCompare()
11098
rfidGroupedAttributes = initRfidData()
111-
authGroupedAttributes = initAuthData()
11299
resultsFragment = ResultsTabFragment.newInstance(RESULTS)
113100
compareFragment = ResultsTabFragment.newInstance(COMPARE)
114101
rfidFragment = ResultsTabFragment.newInstance(RFID)
115-
authFragment = ResultsTabFragment.newInstance(AUTH)
116102
replaceFragment(resultsFragment, this, R.id.results_compare_rfid)
117103
binding.tabLayout.getTabAt(selectedTabIndex)!!.select()
118104
} else {
@@ -121,12 +107,10 @@ class ResultsActivity : AppCompatActivity() {
121107
compareFragment =
122108
savedInstanceState.getSerializable("compareFragment") as ResultsTabFragment
123109
rfidFragment = savedInstanceState.getSerializable("rfidFragment") as ResultsTabFragment
124-
authFragment = savedInstanceState.getSerializable("authFragment") as ResultsTabFragment
125110

126111
resultsFragment.numberPickerIndex = savedInstanceState.getInt("resultsIndex")
127112
compareFragment.numberPickerIndex = savedInstanceState.getInt("compareIndex")
128113
rfidFragment.numberPickerIndex = savedInstanceState.getInt("rfidIndex")
129-
authFragment.numberPickerIndex = savedInstanceState.getInt("authIndex")
130114

131115
selectedTabIndex = savedInstanceState.getInt("selectedTabIndex")
132116
}
@@ -136,8 +120,6 @@ class ResultsActivity : AppCompatActivity() {
136120
turnTabOff(1)
137121
if (rfidGroupedAttributes.isEmpty())
138122
turnTabOff(2)
139-
if (authGroupedAttributes.isEmpty())
140-
turnTabOff(3)
141123
}
142124

143125
override fun onSaveInstanceState(savedInstanceState: Bundle) {
@@ -146,65 +128,13 @@ class ResultsActivity : AppCompatActivity() {
146128
savedInstanceState.putSerializable("resultsFragment", resultsFragment)
147129
savedInstanceState.putSerializable("compareFragment", compareFragment)
148130
savedInstanceState.putSerializable("rfidFragment", rfidFragment)
149-
savedInstanceState.putSerializable("authFragment", authFragment)
150131

151132
savedInstanceState.putInt("resultsIndex", resultsFragment.numberPickerIndex)
152133
savedInstanceState.putInt("compareIndex", compareFragment.numberPickerIndex)
153134
savedInstanceState.putInt("rfidIndex", rfidFragment.numberPickerIndex)
154-
savedInstanceState.putInt("authIndex", authFragment.numberPickerIndex)
155135

156136
savedInstanceState.putInt("selectedTabIndex", selectedTabIndex)
157137
}
158-
159-
private fun initAuthData(): List<GroupedAttributes> {
160-
val pickerData = mutableListOf<GroupedAttributes>()
161-
162-
results.authenticityResult?.checks?.forEach { checks ->
163-
164-
val attributes = mutableListOf<Attribute>()
165-
166-
checks.elements.forEach{
167-
val error = if (it.elementDiagnose == 1) "" else (it.getElementDiagnoseName(this))
168-
when (it) {
169-
is DocumentReaderIdentResult -> {
170-
val name = it.getElementTypeName(this) + " [${checks.pageIndex}]"
171-
val item = Attribute(name, error, source = checks.type, pageIndex = checks.pageIndex,
172-
valid = it.status,
173-
image = it.image?.bitmap,
174-
imageEtalon = it.etalonImage?.bitmap,
175-
auth = true
176-
)
177-
attributes.add(item)
178-
}
179-
is DocumentReaderPhotoIdentResult -> {
180-
val name = it.getElementTypeName(this) + " [${checks.pageIndex}]"
181-
if(it.resultImages.size > 0) {
182-
val image = it.resultImages.get(0).bitmap;
183-
val item = Attribute(name, error, source = checks.type, pageIndex = checks.pageIndex,
184-
valid = it.status,
185-
image = image,
186-
auth = true
187-
)
188-
attributes.add(item)
189-
}
190-
}
191-
is DocumentReaderSecurityFeatureCheck -> {
192-
val name = it.getElementTypeName(this) + " [${checks.pageIndex}]"
193-
val item = Attribute(name, error, source = checks.type, pageIndex = checks.pageIndex,
194-
valid = it.status,
195-
auth = true
196-
)
197-
attributes.add(item)
198-
}
199-
}
200-
}
201-
val group = AuthGroupedAttributes(checks.getTypeName(this), attributes, checkStatus = checks.status)
202-
pickerData.add(group)
203-
}
204-
pickerData.sortBy { it.type }
205-
206-
return pickerData
207-
}
208138
private fun initResults(): List<GroupedAttributes> {
209139
val pickerData = mutableListOf<GroupedAttributes>()
210140
val attributes = mutableListOf<Attribute>()
@@ -390,12 +320,10 @@ class ResultsActivity : AppCompatActivity() {
390320
var resultsGroupedAttributes: List<GroupedAttributes> = listOf()
391321
var compareGroupedAttributes: List<GroupedAttributes> = listOf()
392322
var rfidGroupedAttributes: List<GroupedAttributes> = listOf()
393-
var authGroupedAttributes: List<GroupedAttributes> = listOf()
394323

395324
const val RESULTS = 0
396325
const val COMPARE = 1
397326
const val RFID = 2
398-
const val AUTH = 3
399327
}
400328
}
401329

@@ -418,7 +346,6 @@ class ResultsTabFragment : Fragment(), Serializable {
418346
val pickerData = when (pickerDataReference) {
419347
ResultsActivity.RESULTS -> ResultsActivity.resultsGroupedAttributes
420348
ResultsActivity.COMPARE -> ResultsActivity.compareGroupedAttributes
421-
ResultsActivity.AUTH -> ResultsActivity.authGroupedAttributes
422349
else -> ResultsActivity.rfidGroupedAttributes
423350
}
424351
if (pickerData.isEmpty())
@@ -490,24 +417,10 @@ class GroupFragment : Fragment() {
490417
tag = 30
491418
else if (type.contains("data groups") || type.contains("data status"))
492419
tag = 40
493-
494-
if (groupedAttributes is AuthGroupedAttributes){
495-
sectionsData.add(AuthSection(groupedAttributes.type, tag, (groupedAttributes as AuthGroupedAttributes).checkStatus))
496-
} else {
497-
sectionsData.add(Section(groupedAttributes.type, tag))
498-
}
420+
sectionsData.add(Section(groupedAttributes.type, tag))
499421

500422
for (attribute in groupedAttributes.items) {
501423
when {
502-
attribute.auth -> sectionsData.add(
503-
ImagePair(
504-
attribute.name,
505-
attribute.value,
506-
attribute.image,
507-
attribute.imageEtalon,
508-
attribute.valid
509-
)
510-
)
511424
attribute.image != null -> sectionsData.add(
512425
Image(
513426
attribute.name,

0 commit comments

Comments
 (0)