Skip to content

Commit

Permalink
Updated projects
Browse files Browse the repository at this point in the history
  • Loading branch information
ci-bot committed Apr 22, 2024
1 parent ef7396a commit 5f5ef8a
Show file tree
Hide file tree
Showing 58 changed files with 632 additions and 447 deletions.
4 changes: 2 additions & 2 deletions 1120-Without License/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

implementation 'com.regula.btdevice:api:1.0.+@aar'
implementation 'com.regula.documentreader.core:fullauthrfid:7.1.+@aar'
implementation('com.regula.documentreader:api:7.1.+@aar') {
implementation 'com.regula.documentreader.core:fullauthrfid:7.2.+@aar'
implementation('com.regula.documentreader:api:7.2.+@aar') {
transitive = true;
}
}
4 changes: 2 additions & 2 deletions Advanced/DocumentReader-Kotlin/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ dependencies {

implementation 'com.regula.btdevice:api:1.0.+@aar'
//noinspection GradleDynamicVersion
implementation 'com.regula.documentreader.core:fullrfid:7.1.+@aar'
implementation 'com.regula.documentreader.core:fullrfid:7.2.+@aar'
//noinspection GradleDynamicVersion
implementation('com.regula.documentreader:api:7.1.+@aar') {
implementation('com.regula.documentreader:api:7.2.+@aar') {
transitive = true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,9 @@ class CommonRecyclerAdapter(private val items: List<Base>) :
val status = base as Status
binding.title.text = status.title.uppercase(Locale.ROOT)
when (status.value) {
0 -> binding.value.setImageResource(android.R.drawable.ic_menu_add)
1 -> binding.value.setImageResource(android.R.drawable.ic_menu_close_clear_cancel)
2 -> binding.value.setImageResource(android.R.drawable.ic_menu_help)
0 -> binding.value.setImageResource(R.drawable.reg_icon_check_ok)
1 -> binding.value.setImageResource(R.drawable.reg_icon_check_fail)
2 -> binding.value.setImageResource(R.drawable.reg_icon_no_check)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ class ResultsActivity : AppCompatActivity() {
startActivity(Intent(this, DirectResultsActivity::class.java))
}

if (results.status.overallStatus == CH_CHECK_OK)
binding.overAllResultImage.setImageResource(android.R.drawable.ic_menu_add)
if (results.status.overallStatus == CH_CHECK_WAS_NOT_DONE)
binding.overAllResultImage.setImageResource(android.R.drawable.ic_menu_help)
when(results.status.overallStatus) {
CH_CHECK_OK -> binding.overAllResultImage.setImageResource(R.drawable.reg_icon_check_ok)
CH_CHECK_WAS_NOT_DONE -> binding.overAllResultImage.setImageResource(R.drawable.reg_icon_no_check)
else -> binding.overAllResultImage.setImageResource(R.drawable.reg_icon_check_fail)
}

binding.tabLayout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
override fun onTabSelected(tab: TabLayout.Tab?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import com.regula.documentreader.SettingsActivity.Companion.customString
import com.regula.documentreader.SettingsActivity.Companion.functionality
import com.regula.documentreader.SettingsActivity.Companion.isDataEncryptionEnabled
import com.regula.documentreader.api.DocumentReader.Instance
import com.regula.documentreader.api.enums.BarcodeType
import com.regula.documentreader.api.enums.DocReaderFrame.*
import com.regula.documentreader.api.enums.MRZFormat.*
import com.regula.documentreader.api.enums.diDocType
Expand Down Expand Up @@ -658,26 +659,26 @@ class APISettingsFragment : Fragment() {
"Do barcodes",
"processParams.doBarcodes",
arrayListOf(
BSItem(".unknown"),
BSItem(".code128"),
BSItem(".code39"),
BSItem(".EAN8"),
BSItem(".ITF"),
BSItem(".PDF417"),
BSItem(".PDF417"),
BSItem(".STF"),
BSItem(".MTF"),
BSItem(".IATA"),
BSItem(".CODABAR"),
BSItem(".UPCA"),
BSItem(".CODE93"),
BSItem(".UPCE"),
BSItem(".EAN13"),
BSItem(".QRCODE"),
BSItem(".AZTEC"),
BSItem(".DATAMATRIX"),
BSItem(".ALL_1D"),
BSItem(".code11")
BSItem(BarcodeType.valueOf(BarcodeType.UNKNOWN)),
BSItem(BarcodeType.valueOf(BarcodeType.BCT_CODE128)),
BSItem(BarcodeType.valueOf(BarcodeType.CODE39)),
BSItem(BarcodeType.valueOf(BarcodeType.EAN8)),
BSItem(BarcodeType.valueOf(BarcodeType.ITF)),
BSItem(BarcodeType.valueOf(BarcodeType.PDF417)),
BSItem(BarcodeType.valueOf(BarcodeType.STF)),
BSItem(BarcodeType.valueOf(BarcodeType.MTF)),
BSItem(BarcodeType.valueOf(BarcodeType.IATA)),
BSItem(BarcodeType.valueOf(BarcodeType.CODABAR)),
BSItem(BarcodeType.valueOf(BarcodeType.UPCA)),
BSItem(BarcodeType.valueOf(BarcodeType.CODE93)),
BSItem(BarcodeType.valueOf(BarcodeType.UPCE)),
BSItem(BarcodeType.valueOf(BarcodeType.EAN13)),
BSItem(BarcodeType.valueOf(BarcodeType.QRCODE)),
BSItem(BarcodeType.valueOf(BarcodeType.AZTEC)),
BSItem(BarcodeType.valueOf(BarcodeType.DATAMATRIX)),
BSItem(BarcodeType.valueOf(BarcodeType.ALL_1D)),
BSItem(BarcodeType.valueOf(BarcodeType.CODE11)),
BSItem(BarcodeType.valueOf(BarcodeType.JABCODE))
),
{ Instance().processParams().doBarcodes?.toMutableList() ?: mutableListOf() },
{ Instance().processParams().doBarcodes = it.toTypedArray() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/overAllResult"
app:layout_constraintTop_toTopOf="parent"
app:tint="@color/confirm_red"
app:srcCompat="@android:drawable/ic_menu_close_clear_cancel" />
app:srcCompat="@drawable/reg_icon_check_fail" />
</androidx.constraintlayout.widget.ConstraintLayout>

<com.google.android.material.tabs.TabLayout
Expand Down
4 changes: 2 additions & 2 deletions BackendProcessing/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ dependencies {
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

implementation 'com.regula.documentreader.core:fullrfid:7.1.+@aar'
implementation('com.regula.documentreader:api:7.1.+@aar') {
implementation 'com.regula.documentreader.core:fullrfid:7.2.+@aar'
implementation('com.regula.documentreader:api:7.2.+@aar') {
transitive = true
}
}
4 changes: 2 additions & 2 deletions Basic/DocumentReader-sample_java/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'

implementation 'com.regula.documentreader.core:fullrfid:7.1.+@aar' // use fullauthrfid core for 7310
implementation('com.regula.documentreader:api:7.1.+@aar') {
implementation 'com.regula.documentreader.core:fullrfid:7.2.+@aar' // use fullauthrfid core for 7310
implementation('com.regula.documentreader:api:7.2.+@aar') {
transitive = true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public void onCompleted(int action, DocumentReaderResults results, DocumentReade
@Override
public void onCompleted(int rfidAction, @Nullable DocumentReaderResults documentReaderResults, @Nullable DocumentReaderException e) {
if (rfidAction == DocReaderAction.COMPLETE || rfidAction == DocReaderAction.CANCEL) {
mainFragment.displayResults(results);
mainFragment.displayResults(documentReaderResults);
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions Basic/DocumentReader-sample_kotlin/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

implementation 'com.regula.documentreader.core:fullrfid:7.1.+@aar'
implementation('com.regula.documentreader:api:7.1.+@aar') {
implementation 'com.regula.documentreader.core:fullrfid:7.2.+@aar'
implementation('com.regula.documentreader:api:7.2.+@aar') {
transitive = true;
}
}
4 changes: 2 additions & 2 deletions BleDevice/BleDevice-Kotlin/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

implementation 'com.regula.btdevice:api:1.0.+@aar'
implementation 'com.regula.documentreader.core:fullauthrfid:7.1.+@aar'
implementation('com.regula.documentreader:api:7.1.+@aar') {
implementation 'com.regula.documentreader.core:fullauthrfid:7.2.+@aar'
implementation('com.regula.documentreader:api:7.2.+@aar') {
transitive = true;
}
}
4 changes: 2 additions & 2 deletions CustomCamera/CustomCamera-Kotlin/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ dependencies {
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

implementation 'com.regula.documentreader.core:mrzrfid:7.1.+@aar'
implementation('com.regula.documentreader:api:7.1.+@aar') {
implementation 'com.regula.documentreader.core:mrzrfid:7.2.+@aar'
implementation('com.regula.documentreader:api:7.2.+@aar') {
transitive = true;
}
}
4 changes: 2 additions & 2 deletions CustomRfid-kotlin/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ dependencies {
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

implementation 'com.regula.documentreader.core:mrzrfid:7.1.+@aar'
implementation('com.regula.documentreader:api:7.1.+@aar') {
implementation 'com.regula.documentreader.core:mrzrfid:7.2.+@aar'
implementation('com.regula.documentreader:api:7.2.+@aar') {
transitive = true;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Regula Document Reader (Android version)
The `PackageForReprocess-Kotlin` sample project shows how to send a request to a web service when `shouldReturnPackageForReprocess` is true
`DownloadDatabaseSample` folder contains the sample project with database features.

# Content
* [How to build the demo application](#how-to-build-the-demo-application)
Expand All @@ -10,9 +10,9 @@ The `PackageForReprocess-Kotlin` sample project shows how to send a request to a
## How to build the demo application
1. Visit our [Client Portal](https://client.regulaforensics.com/) to get a trial license (`regula.license` file). The license creation wizard will guide you through the necessary steps.
2. Download or clone the current repository using the command `git clone https://github.com/regulaforensics/DocumentReader-Android.git`.
3. Open the `PackageForReprocess-Kotlin` project in an IDE.
4. Copy the license file to the project: `PackageForReprocess-Kotlin/app/src/main/res/raw/`.
5. Copy the database file db.dat from [Client Portal](https://client.regulaforensics.com/customer/databases) to the project: `PackageForReprocess-Kotlin/app/src/main/assets/Regula/`.
3. Open the `DownloadDatabaseSample` project in an IDE.
4. Copy the license file to the project: `DownloadDatabaseSample/app/src/assets/`.
5. Optionaly: Copy the database file db.dat from [Client Portal](https://client.regulaforensics.com/customer/databases) to the project: `DownloadDatabaseSample/app/src/main/assets/Regula/`.
6. Change the application ID to the one you have specified during the registration at [Client Portal](https://client.regulaforensics.com/).
7. Run the project.
Note: Android Gradle plugin requires Java 11 to run
Expand Down
55 changes: 55 additions & 0 deletions DownloadDatabaseSample/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
}

android {
namespace = "com.regula.documentreader"
compileSdk = 34

defaultConfig {
applicationId = "com.regula.documentreader"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0"

vectorDrawables {
useSupportLibrary = true
}
}

buildFeatures {
viewBinding = true
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}

dependencies {

//noinspection GradleCompatible
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("com.google.android.material:material:1.11.0")

implementation("com.regula.documentreader.core:fullrfid:7.1.+@aar")
implementation("com.regula.documentreader:api:7.1.+@aar") {
isTransitive = true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.regula.documentreader

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.regula.documentreader", appContext.packageName)
}
}
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.regula.documentreader">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.DocReader"
android:theme="@style/AppTheme"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true"
android:screenOrientation="portrait">
android:label="@string/app_name"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>

</manifest>
Loading

0 comments on commit 5f5ef8a

Please sign in to comment.