From e5325d8c5cd612698df8f714d4a04d9d00aa8a5f Mon Sep 17 00:00:00 2001 From: Robert Medvedec Date: Wed, 17 Jan 2024 09:37:26 +0100 Subject: [PATCH 1/5] Created two new Compose sample apps - one line scan example and fragment example --- .../BlinkID-ComposeFragmentSample/.gitignore | 1 + .../build.gradle | 58 +++ .../proguard-rules.pro | 21 ++ .../src/main/AndroidManifest.xml | 25 ++ .../com/microblink/blinkid/MainActivity.kt | 330 ++++++++++++++++++ .../res/drawable/ic_launcher_foreground.xml | 14 + .../res/layout/recognizer_runner_layout.xml | 5 + .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 2395 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 1663 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 3333 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 5150 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 7264 bytes .../src/main/res/values/colors.xml | 10 + .../src/main/res/values/strings.xml | 3 + .../src/main/res/values/styles.xml | 12 + .../BlinkID-ComposeMinimalSample/.gitignore | 1 + .../BlinkID-ComposeMinimalSample/build.gradle | 56 +++ .../proguard-rules.pro | 21 ++ .../src/main/AndroidManifest.xml | 27 ++ .../microblink/blinkid/BlinkIdSampleApp.kt | 18 + .../com/microblink/blinkid/MainActivity.kt | 138 ++++++++ .../res/drawable/ic_launcher_foreground.xml | 14 + .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 2395 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 1663 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 3333 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 5150 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 7264 bytes .../src/main/res/values/colors.xml | 10 + .../src/main/res/values/strings.xml | 3 + .../src/main/res/values/styles.xml | 12 + BlinkIDSample/build.gradle | 2 +- BlinkIDSample/settings.gradle | 2 + 34 files changed, 792 insertions(+), 1 deletion(-) create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/.gitignore create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/build.gradle create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/proguard-rules.pro create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/AndroidManifest.xml create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/java/com/microblink/blinkid/MainActivity.kt create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/drawable/ic_launcher_foreground.xml create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/layout/recognizer_runner_layout.xml create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/colors.xml create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/strings.xml create mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/styles.xml create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/.gitignore create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/build.gradle create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/proguard-rules.pro create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/AndroidManifest.xml create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/java/com/microblink/blinkid/BlinkIdSampleApp.kt create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/java/com/microblink/blinkid/MainActivity.kt create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/drawable/ic_launcher_foreground.xml create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/values/colors.xml create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/values/strings.xml create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/values/styles.xml diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/.gitignore b/BlinkIDSample/BlinkID-ComposeFragmentSample/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeFragmentSample/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/build.gradle b/BlinkIDSample/BlinkID-ComposeFragmentSample/build.gradle new file mode 100644 index 00000000..96c475a0 --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeFragmentSample/build.gradle @@ -0,0 +1,58 @@ +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} + +android { + namespace 'com.microblink.blinkid' + compileSdk 34 + + defaultConfig { + applicationId "com.microblink.blinkid" + minSdk 21 + targetSdk rootProject.ext.targetSdkVersion + versionCode 1 + versionName "1.0" + + } + + buildTypes { + release { + debuggable true + minifyEnabled true + shrinkResources true + signingConfig signingConfigs.debug + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + composeOptions { + kotlinCompilerExtensionVersion = "1.4.0" + } + buildFeatures { + compose = true + viewBinding = true + } + kotlinOptions { + jvmTarget = '1.8' + } +} + +dependencies { + implementation("com.microblink:blinkid:${rootProject.ext.blinkIdVersion}@aar") { + transitive = true + } + implementation 'androidx.core:core-ktx:1.10.0' + implementation 'androidx.compose.material3:material3' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation platform('androidx.compose:compose-bom:2023.05.01') + implementation 'androidx.activity:activity-compose:1.8.2' + implementation 'androidx.fragment:fragment-ktx:1.6.2' + implementation 'androidx.compose.ui:ui-viewbinding:1.5.4' + implementation 'androidx.compose.ui:ui' + + implementation project(':LibUtils') +} \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/proguard-rules.pro b/BlinkIDSample/BlinkID-ComposeFragmentSample/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeFragmentSample/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/AndroidManifest.xml b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/AndroidManifest.xml new file mode 100644 index 00000000..5dd451e8 --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/AndroidManifest.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/java/com/microblink/blinkid/MainActivity.kt b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/java/com/microblink/blinkid/MainActivity.kt new file mode 100644 index 00000000..c4ce91cd --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/java/com/microblink/blinkid/MainActivity.kt @@ -0,0 +1,330 @@ +package com.microblink.blinkid + +import android.annotation.SuppressLint +import android.content.Context +import android.content.res.Configuration +import android.os.Bundle +import android.widget.Toast +import androidx.activity.compose.BackHandler +import androidx.activity.compose.setContent +import androidx.appcompat.app.AppCompatActivity +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonColors +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.MutableState +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.colorResource +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.compose.ui.viewinterop.AndroidViewBinding +import com.microblink.blinkid.databinding.RecognizerRunnerLayoutBinding +import com.microblink.blinkid.entities.recognizers.RecognizerBundle +import com.microblink.blinkid.entities.recognizers.blinkid.generic.BlinkIdMultiSideRecognizer +import com.microblink.blinkid.entities.recognizers.blinkid.generic.BlinkIdSingleSideRecognizer +import com.microblink.blinkid.fragment.RecognizerRunnerFragment +import com.microblink.blinkid.fragment.overlay.ScanningOverlay +import com.microblink.blinkid.fragment.overlay.blinkid.BlinkIdOverlayController +import com.microblink.blinkid.fragment.overlay.blinkid.BlinkIdOverlaySettings +import com.microblink.blinkid.fragment.overlay.blinkid.BlinkIdOverlayView +import com.microblink.blinkid.fragment.overlay.blinkid.reticleui.ReticleOverlayStrings +import com.microblink.blinkid.fragment.overlay.blinkid.reticleui.ReticleOverlayView +import com.microblink.blinkid.recognition.RecognitionSuccessType +import com.microblink.blinkid.uisettings.BlinkIdUISettings +import com.microblink.blinkid.view.recognition.ScanResultListener + +class MainActivity : AppCompatActivity(), RecognizerRunnerFragment.ScanningOverlayBinder { + + var mRecognizerRunnerFragment: RecognizerRunnerFragment? = null + private var mScanOverlay: BlinkIdOverlayController? = null + lateinit var mRecognizerBundle: RecognizerBundle + private lateinit var showScanning: MutableState + + @SuppressLint("RestrictedApi") + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + // setting the license key has to be done in the Application class (in this example it is done through the com.microblink.BlinkIdSampleApp) + + this.run { + setContent { + supportActionBar?.setShowHideAnimationEnabled(false) + showScanning = + rememberSaveable { mutableIntStateOf(0) } + when (showScanning.value) { + 0 -> { + LaunchedEffect(supportActionBar?.isShowing) { + if (supportActionBar?.isShowing == false) supportActionBar?.show() + } + MainMenu() + } + + 1 -> { + AndroidViewBindingBlinkIdFragment() + } + + 2 -> { + LaunchedEffect(supportActionBar?.isShowing) { + if (supportActionBar?.isShowing == false) supportActionBar?.show() + } + ResultScreen() + } + } + } + } + } + + override fun onConfigurationChanged(newConfig: Configuration) { + if (supportFragmentManager.fragments.contains(mRecognizerRunnerFragment)) { + supportFragmentManager.beginTransaction().apply { + mRecognizerRunnerFragment?.recognizerRunnerView?.pauseScanning() + super.onConfigurationChanged(newConfig) + mRecognizerRunnerFragment?.recognizerRunnerView?.changeConfiguration(newConfig) + mRecognizerRunnerFragment?.recognizerRunnerView?.resumeScanning(false) + }.commitNow() + } else super.onConfigurationChanged(newConfig) + } + + override fun getScanningOverlay(): ScanningOverlay { + if (mScanOverlay == null) { + mScanOverlay = createOverlayController(this, mRecognizerBundle, mScanResultListener) + } + return mScanOverlay as BlinkIdOverlayController + } + + private val mScanResultListener: ScanResultListener = object : ScanResultListener { + override fun onScanningDone(recognitionSuccessType: RecognitionSuccessType) { + // pause scanning to prevent new results while fragment is being removed + mRecognizerRunnerFragment?.recognizerRunnerView?.pauseScanning() + + when (recognitionSuccessType) { + RecognitionSuccessType.UNSUCCESSFUL -> { + Toast.makeText(this@MainActivity, "Unsuccessful scan", Toast.LENGTH_SHORT) + .show() + } + + RecognitionSuccessType.SUCCESSFUL -> { + when (mRecognizerBundle.recognizers[0].result) { + is BlinkIdSingleSideRecognizer.Result -> { + val result = + mRecognizerBundle.recognizers[0].result as BlinkIdSingleSideRecognizer.Result + Toast.makeText( + this@MainActivity, + "The name is " + (result.firstName?.value() + ?: result.fullName?.value()), + Toast.LENGTH_SHORT + ).show() + } + + is BlinkIdMultiSideRecognizer.Result -> { + val result = + mRecognizerBundle.recognizers[0].result as BlinkIdMultiSideRecognizer.Result + Toast.makeText( + this@MainActivity, + "The name is " + (result.firstName?.value() + ?: result.fullName?.value()), + Toast.LENGTH_SHORT + ).show() + } + + else -> { + Toast.makeText( + this@MainActivity, + "Successful scan", + Toast.LENGTH_SHORT + ).show() + } + } + } + + RecognitionSuccessType.STAGE_SUCCESSFUL -> Toast.makeText( + this@MainActivity, + "Stage success", + Toast.LENGTH_SHORT + ).show() + + RecognitionSuccessType.PARTIAL -> Toast.makeText( + this@MainActivity, + "Partial success", + Toast.LENGTH_SHORT + ).show() + } + + supportFragmentManager.beginTransaction().apply { + mScanOverlay = null + showScanning.value = 2 + }.commit() + + } + + override fun onUnrecoverableError(throwable: Throwable) {} + } + + private fun createOverlayController( + context: Context, + recognizerBundle: RecognizerBundle, + scanResultListener: ScanResultListener, + ): BlinkIdOverlayController { + val overlaySettings = BlinkIdOverlaySettings.Builder(recognizerBundle).build() + val overlayStrings = ReticleOverlayStrings.Builder(context).build() + val customStyle = R.style.CustomStyle + val reticleOverlay: BlinkIdOverlayView = + ReticleOverlayView(true, true, true, false, true, true, overlayStrings, customStyle) + return BlinkIdOverlayController(overlaySettings, scanResultListener, reticleOverlay) + } + + // can be used just like the previous function + private fun createOverlayController( + recognizerBundle: RecognizerBundle, + scanResultListener: ScanResultListener + ): BlinkIdOverlayController { + val overlayStrings = ReticleOverlayStrings.Builder(this@MainActivity).build() + val settings = BlinkIdUISettings(recognizerBundle).also { + it.setShowFlashlightWarning(true) + it.setShowIntroductionDialog(true) + it.setShowOnboardingInfo(true) + it.setShowMandatoryFieldsMissing(true) + it.setAllowHapticFeedback(true) + it.setStrings(overlayStrings) + it.setOverlayViewStyle(R.style.CustomStyle) + } + return settings.createOverlayController(this, scanResultListener) + } + + @Composable + fun MainMenu() { + Column( + Modifier.fillMaxSize(), + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally + ) { + val mButtonColors: ButtonColors = ButtonDefaults.buttonColors( + containerColor = colorResource(id = R.color.mb_lime), contentColor = colorResource( + id = R.color.mb_blue_deep + ) + ) + Button(colors = mButtonColors, onClick = { + supportActionBar?.hide() + mRecognizerBundle = RecognizerBundle(BlinkIdSingleSideRecognizer()) + showScanning.value = 1 + }) { + Text("SingleSide Scan") + } + Button(colors = mButtonColors, onClick = { + supportActionBar?.hide() + mRecognizerBundle = RecognizerBundle(BlinkIdMultiSideRecognizer()) + showScanning.value = 1 + }) { + Text("MultiSide Scan") + } + + } + } + + @Composable + fun ResultScreen() { + val result = + mRecognizerRunnerFragment?.recognizerRunnerView?.recognizerBundle?.recognizers?.get(0) + Column( + Modifier + .fillMaxSize() + .padding(top = 20.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.Center) { + result?.name?.let { + Text( + it, + color = colorResource(id = R.color.mb_lime), + fontSize = 20.sp + ) + } + } + + if (result != null) { + when (result.result) { + + is BlinkIdSingleSideRecognizer.Result -> { + val resultValues = result.result as BlinkIdSingleSideRecognizer.Result + ResultRow( + fieldName = "First name", + result = resultValues.firstName?.value() ?: "" + ) + ResultRow( + fieldName = "Last name", + result = resultValues.lastName?.value() ?: "" + ) + ResultRow( + fieldName = "Full name", + result = resultValues.fullName?.value() ?: "" + ) + ResultRow( + fieldName = "Date of birth", + result = resultValues.dateOfBirth?.date.toString() + ) + } + + is BlinkIdMultiSideRecognizer.Result -> { + val resultValues = result.result as BlinkIdMultiSideRecognizer.Result + ResultRow( + fieldName = "First name", + result = resultValues.firstName?.value() ?: "" + ) + ResultRow( + fieldName = "Last name", + result = resultValues.lastName?.value() ?: "" + ) + ResultRow( + fieldName = "Date of issue", + result = resultValues.dateOfIssue?.date.toString() + ) + ResultRow( + fieldName = "Date of expiry", + result = resultValues.dateOfExpiry?.date.toString() + ) + } + } + } + } + BackHandler(true) { + showScanning.value = 0 + } + } + + @Composable + fun ResultRow(fieldName: String, result: String) { + Row( + Modifier + .fillMaxWidth() + .padding(start = 10.dp, top = 10.dp) + ) { + Text("$fieldName: $result", color = Color.White) + } + } + + @Composable + fun AndroidViewBindingBlinkIdFragment() { + AndroidViewBinding(RecognizerRunnerLayoutBinding::inflate) { + mRecognizerRunnerFragment = + fragmentContainerView.getFragment() + } + + BackHandler(true) { + showScanning.value = 0 + // this is done to reinit overlay when re-starting the scanning (so the introduction dialog is shown again) + mScanOverlay = null + } + } +} diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/drawable/ic_launcher_foreground.xml b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 00000000..4c3a1252 --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/layout/recognizer_runner_layout.xml b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/layout/recognizer_runner_layout.xml new file mode 100644 index 00000000..dd9d321a --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/layout/recognizer_runner_layout.xml @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..70a96625 --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-hdpi/ic_launcher.png b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..64efd61187ad91ac65ec907909851305050b7227 GIT binary patch literal 2395 zcmV-h38eOkP) zz2}~Lw_UqX3$;)SwNMN0Mnvre9orb~d7OSVVWig`xd0 z*wonIY)c@f%a^M2M2PB(V0=u%Acjwe!|}8#4*wQ{9TAZ8YV8#&E-oIUjoDChUEIE= z=F*2&3shHEM|<-Q((5Tp=)uVG)O$z*jY>?SH5<3lg^GWq>rKSjQ176lM~hb=R(}NQ zP*rvD3mCIPpi`$yDP!FhiXJ_K?id(DVZ9<-(6!GK6dpN_Qr`cRjuibxjScmZj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BrPUKYFmJz1SS>S2eW4%DYm%$n{ z4Nig?nf4JFmMq>%sqVnK3(w+qHP|B%j+ppzs_c=NDc+8yC`lg{z1~Wwo`@bjQ*Ub5 zVvj&Lq=ch)+(Azu+r^TA+fqT<#MeU+oXuI;l3j*90s$O%^Ys|a!!eU-*PeW-*pFj) zM$-p(z!wAO6zvlTz#)8Vc(wHk`+DGjX7qD2>D>=LrzM}QSE_(G$jPrW3c5Ou-WfQb zXum)z==T^LF@s>5m@F{1c{!J;rF8^S!7PLv1c@55SsqxRpc^7lMK0#y z6qzSlS0EK+u}Jl?9>Sv0-Ju5~pn`x!GTs&}b=(|`GKv`jl?VJ=4K3(?C_7-;fhB{H z%ox>66zEWcLYYP97>mEC0Bbq^&_)QR;5b!-lx{*4kZJ9J%*5R*fOM)p^{i?!0`dnldvpXCc;tf`U$52e*x`|G@PILATSVP8Q--gh64v zO(6cGbgx5)4i<|TdmvU<%*NZ+ty>{b=lJ;eh{D1n#Z?#o6d z2TEdNW1|pbT3VX%?xk&!k&!owkM4qj>FMdo+1Wcb@7a^HZTIe#DG{36Ji@SY}idLqxP+}A2evt&EoSmK~KT`f_^~`Vn8fi2Mic+ zi}>`dYw0y1QYY~?brzpt!f2OZ1~Ir|F+M2!(4cl(Ak;!F)Iu#N+JER1@GsjPGuHqB N002ovPDHLkV1nulcrX9} literal 0 HcmV?d00001 diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-mdpi/ic_launcher.png b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..24c105a84b751a3625dab54d89d3e1084f824e7d GIT binary patch literal 1663 zcmV-_27vjAP)%|iw6j~gV_N!%53=72h@4A^90{=jWYYpQ-BbsE zfL*VjnDA7Ldt8Gax6>3$_;m2NDxj07qw3%{T`uS0agUokZr7}V$u#sCQ|&5E0^C`w zR_j8S({UM-+%Bh^UA^oY7VLJL*I+PuM@B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aBSdR!o}AUK@A6(1n}D7IBIzrM<7~_ z0+b-Wf*=cXmk zZJ&MC&ttFxWDsIN0u-{)kP7JUN)+-`kt&I7J${4H2$WC2KUb|91lff}0hyVbdbwSV zPPq}@uu&in6UngHK#>*>zXBH|a7zW5+DH~QYPS1AR>1j+b2UqsE_xWU3snL5`Hl8N zhYsynUw7lQRer(*>EOu8$HfTTPLZz&nGIwE85MqW`b=D0Tr^~tnVG3y0VwO%t;3I$ z{q)qSQ){pshz3MkF8fD(7(zDRLpHTFPRh>C{ugBCm0f7XTghEXNl63B%S$U=;t@wf zqS0nNa-!ij4P+o_hD;!vf`a_2goFfaz;`cLu;9mBo_fmd6DCZ+F9Jo+PD`6~^5lss zXZ5Y>Bnp1WEj+)Z=Pl4=haNq8 zM2WxM1rJ3i!Pp@KA&Vi931s7yQ3tQg!dhSv-5C=TbFU~d z;@=MldJ6D+S#24}-~q@4vJwBj^R`>Eib#Q0u_^x~Iy(9nUAuPe)TK+8`#N{-9Mu-V z*dYVR0y6Q+ChRlcS3x7NZ?Vpy(Y6d^09hC!c)QreE_ShtUF>3)A4d5vt#aQ1>f!~a P00000NkvXXu0mjfTgEGV literal 0 HcmV?d00001 diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-xxhdpi/ic_launcher.png b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..fdc20eadd59d1d088034a2784b4cf3d7d65960a9 GIT binary patch literal 5150 zcmaJ_S2P@4v^EoEj9`csgNzm>O7t?(W1>WhMDJaU7@ffwC5RR^dT$Y;8-4T;y+tQT zbb_cM;`(3i(_Q!B?DMd{v)4L%?fsqa?04Fl&&a`yU;+XHa#fY5FK+j^{}zb&)@~x! z8VLyQt*bs&cIt1S+& z)p39p5cYr>Xz8n%D1!Hlfi)2kM)4{zzIYi34oRtklD^6C-rw~;PH1U|ONf-TC;lj1 zPJ@5H86LXc$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L2@)McMD_14fj?;X*h!;n7{LycZXdNa~L+e=v)pEWYW=9vj+T}Z4%r# zSWFZ9L@Mv9ckDkGZ}iPrCuER`m_3aKpPc-ft4Gfycog+%S?0f>4NmqC1wL^hs9NQT zu$V<}P-wWfYh|T50SPYxT(Q<4TNg%UzIWGEpa1RsW_$Uv2zO1z>*C;!*gFro3O&Mn zY}=qC!MXm2s8C}h`r|kGU%rp(wCYxZ#Ru4%{gsmAw^ygB%o=%;29U74N+WFSM6O8^ z*b;C=bQv}HzfoK!Sx(>AzamsyAR9Rieah|9IiP_bOhOpJLd1T4xfYwM)9bztCE>jN zDh=t4|Bg+g;hm4|4Mwh<;9p{SV<6YIZ&M7f`bR`%5uDIAcm1{=MzWN;9PLY^9F^e0 zuUi|Wn_wCQ7m8__;^_bEK%>DT-~5zmgiczsKAPC#7Rp1(3ehPH2tIvRPDx~y1@#7y zKrX@wCBMveM0WYioB2!D(xm8TG?<*2U>uY7@2x+zmBA=R!7ri~exkX;{}){9VtRB$ z12jqvBI?p2W(_~U$(x8eb(ZkE1pgQERWGjB<^`Yni)JZHvffE1`^`(?^tP{2^=20T ek1^@^fNN2(Q`<8X_t-K707Y4~H`UVcfd2t*sRa!H literal 0 HcmV?d00001 diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/colors.xml b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/colors.xml new file mode 100644 index 00000000..f8c6127d --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/strings.xml b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/strings.xml new file mode 100644 index 00000000..92482860 --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + Blink ID Compose Fragment Sample + \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/styles.xml b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/styles.xml new file mode 100644 index 00000000..47e6fddc --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/styles.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/.gitignore b/BlinkIDSample/BlinkID-ComposeMinimalSample/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeMinimalSample/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/build.gradle b/BlinkIDSample/BlinkID-ComposeMinimalSample/build.gradle new file mode 100644 index 00000000..cd695e65 --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeMinimalSample/build.gradle @@ -0,0 +1,56 @@ +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} + +android { + namespace 'com.microblink.blinkid' + compileSdk 34 + + defaultConfig { + applicationId "com.microblink.blinkid" + minSdk 21 + targetSdk 34 + versionCode 1 + versionName "1.0" + + } + + buildTypes { + release { + debuggable true + minifyEnabled true + shrinkResources true + signingConfig signingConfigs.debug + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + composeOptions { + kotlinCompilerExtensionVersion = "1.4.0" + } + buildFeatures { + compose true + } + kotlinOptions { + jvmTarget = '1.8' + } +} + +dependencies { + implementation("com.microblink:blinkid:${rootProject.ext.blinkIdVersion}@aar") { + transitive = true + } + implementation 'androidx.core:core-ktx:1.10.0' + implementation 'androidx.compose.material3:material3' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.activity:activity-compose:1.8.2' + implementation platform('androidx.compose:compose-bom:2023.05.01') + implementation 'androidx.compose.ui:ui' + implementation 'androidx.compose.ui:ui-graphics' + + implementation project(':LibUtils') +} \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/proguard-rules.pro b/BlinkIDSample/BlinkID-ComposeMinimalSample/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeMinimalSample/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/AndroidManifest.xml b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/AndroidManifest.xml new file mode 100644 index 00000000..d51241b9 --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/java/com/microblink/blinkid/BlinkIdSampleApp.kt b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/java/com/microblink/blinkid/BlinkIdSampleApp.kt new file mode 100644 index 00000000..cda1eca1 --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/java/com/microblink/blinkid/BlinkIdSampleApp.kt @@ -0,0 +1,18 @@ +package com.microblink.blinkid + +import android.app.Application +import com.microblink.blinkid.intent.IntentDataTransferMode + +class BlinkIdSampleApp : Application() { + + override fun onCreate() { + super.onCreate() + // obtain your licence at http://microblink.com/login or contact us at http://help.microblink.com + MicroblinkSDK.setLicenseFile("com.microblink.blinkid.mblic", this) + + // use optimised way for transferring RecognizerBundle between activities, while ensuring + // data does not get lost when Android restarts the scanning activity + MicroblinkSDK.setIntentDataTransferMode(IntentDataTransferMode.PERSISTED_OPTIMISED) + } + +} \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/java/com/microblink/blinkid/MainActivity.kt b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/java/com/microblink/blinkid/MainActivity.kt new file mode 100644 index 00000000..c1f5fc6e --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/java/com/microblink/blinkid/MainActivity.kt @@ -0,0 +1,138 @@ +package com.microblink.blinkid + +import android.content.Context +import android.os.Bundle +import android.widget.Toast +import androidx.activity.compose.rememberLauncherForActivityResult +import androidx.activity.compose.setContent +import androidx.activity.result.launch +import androidx.appcompat.app.AppCompatActivity +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonColors +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.colorResource +import androidx.compose.ui.unit.dp +import com.microblink.blinkid.activity.result.ResultStatus +import com.microblink.blinkid.activity.result.contract.MbScan +import com.microblink.blinkid.activity.result.contract.OneSideDocumentScan +import com.microblink.blinkid.entities.recognizers.Recognizer +import com.microblink.blinkid.entities.recognizers.RecognizerBundle +import com.microblink.blinkid.entities.recognizers.blinkid.generic.BlinkIdMultiSideRecognizer +import com.microblink.blinkid.entities.recognizers.blinkid.idbarcode.IdBarcodeRecognizer +import com.microblink.blinkid.uisettings.BlinkIdUISettings + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContent { + val mButtonColors: ButtonColors = ButtonDefaults.buttonColors( + containerColor = colorResource(id = R.color.mb_lime), + contentColor = colorResource( + id = R.color.mb_blue_deep + ) + ) + val blinkIdSimpleLauncher = createBlinkIdSimpleLauncher(this) + val blinkIdCustomLauncher = createBlinkIdCustomLauncher(this) + Column( + modifier = Modifier + .padding(20.dp) + .fillMaxSize() + .padding(20.dp), + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally + ) { + Button( + onClick = { blinkIdSimpleLauncher() }, + colors = mButtonColors + ) { + Text("Simple scan") + } + Button( + onClick = { blinkIdCustomLauncher() }, + colors = mButtonColors + ) { + Text("Custom scan") + } + } + } + } +} + +@Composable +fun createBlinkIdSimpleLauncher(context: Context): () -> Unit { + // OneSideDocumentScan() can also be replaced with TwoSideDocumentScan() for simple multi-side scanning + val launcher = rememberLauncherForActivityResult(OneSideDocumentScan()) { blinkIdResult -> + if (blinkIdResult.resultStatus == ResultStatus.FINISHED && blinkIdResult.result != null) { + Toast.makeText( + context, + "The name is " + (blinkIdResult.result!!.firstName?.value() + ?: blinkIdResult.result!!.fullName?.value()), + Toast.LENGTH_SHORT + ).show() + } else if (blinkIdResult.resultStatus == ResultStatus.CANCELLED) { + Toast.makeText( + context, + "Scan has been cancelled", + Toast.LENGTH_SHORT + ).show() + } + } + return { launcher.launch() } +} + +@Composable +fun createBlinkIdCustomLauncher(context: Context): () -> Unit { + val barcodeRecognizer = IdBarcodeRecognizer() + val multiSideRecognizer = BlinkIdMultiSideRecognizer() + val recognizerBundle = RecognizerBundle(barcodeRecognizer, multiSideRecognizer) + var name = "" + var source = "" + // add more than one recognizer by using MbScan() + val launcher = rememberLauncherForActivityResult(MbScan()) { blinkIdResult -> + if (blinkIdResult.resultStatus == ResultStatus.FINISHED && blinkIdResult.result != null) { + recognizerBundle.loadFromIntent(blinkIdResult.result!!) + recognizerBundle.recognizers.forEach { + if (it.result.resultState != Recognizer.Result.State.Empty) { + when (it.result) { + is BlinkIdMultiSideRecognizer.Result -> { + val result = it.result as BlinkIdMultiSideRecognizer.Result + name = (result.firstName?.value() ?: (result.fullName?.value() ?: "")) + source = " - MultiSide" + } + + is IdBarcodeRecognizer.Result -> { + val result = it.result as IdBarcodeRecognizer.Result + name = + (if (result.firstName != "") result.firstName else result.lastName) + source = " - Barcode" + } + + else -> {} + } + } + } + + Toast.makeText( + context, + "The name is $name $source", + Toast.LENGTH_SHORT + ).show() + + } else if (blinkIdResult.resultStatus == ResultStatus.CANCELLED) { + Toast.makeText( + context, + "Scan has been cancelled", + Toast.LENGTH_SHORT + ).show() + } + } + return { launcher.launch(BlinkIdUISettings(recognizerBundle)) } +} \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/drawable/ic_launcher_foreground.xml b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 00000000..4c3a1252 --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..70a96625 --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-hdpi/ic_launcher.png b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..64efd61187ad91ac65ec907909851305050b7227 GIT bin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linkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..24c105a84b751a3625dab54d89d3e1084f824e7d GIT binary patch literal 1663 zcmV-_27vjAP)%|iw6j~gV_N!%53=72h@4A^90{=jWYYpQ-BbsE zfL*VjnDA7Ldt8Gax6>3$_;m2NDxj07qw3%{T`uS0agUokZr7}V$u#sCQ|&5E0^C`w zR_j8S({UM-+%Bh^UA^oY7VLJL*I+PuM@B{z_dE{a_SI0W+U0FQ|p#VH4HqTWHH$A5!Y7e7b4b6SQ#YV*yy6 zww_+uv6sH9Zz8kVtXM-0B7vHkFOo!E1BOH(q#b}YC#`*wa`IlICHLeilvV?tTl4Hz zI{M`~>iyfGSXYa{v166VqOJjBIs_~h3pKa>$gEw=terRz(s?RHf=AW_{273xP;@UJd&rF%klcV zCB%|xbP06#UZj;78x+DstXlgro%yDYDQ{OOErPA<^9^}E$BIXvp{_rBqD$aNb**N! zxj*v-Dmzq7ea3#Dahxp7))7kwoTG zo4rn_BRm4E?(w3Y7Z)r(@To#@G=cR+d5I6@dHak5;SoSbg{DMY5ElCU#2JO)XaPHn zo#ygZ<`j5GM@PdW03SfDFFP2b2F|Qn`5P(VV`AyOcmJXAeE(OC}1OSlQRs1nI zf|L!@0jf|$IW7ay@0VXYA|rqv7mbTd0Ekb@^u_T=k{Ji`%5GLHE=v5*`h_h2IPCVw z2;hodSF2q_CPhY-6$%v~k6lJ)7yAUrLj@3VCdL)DP&Vs%W#u^zvYIBGS_u8HuB?($ zRZ460%xL_hLI5ad&OB8$8mu|zfW-}c{XWuK)hPUncXLrAFzL)nOL3I4`aYO1z~SLD z>8oE<%ol-1zsGNos1ZQA-~RSKg)k13)*vY>&4G}Ms0GKD=gL6&!skVe0DxXq>#YI+ zN7SlPkvHUgq6YNb9i3e>LjZAl)3zdoP!2>9ghKJH0)Wh|RWi$Xb5|+ZZMK;q0N}k1 zglN5;KpaOhLPo9AHKZV}|Iw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wUZA-E4WgsCy5s`A6HpH%0B2nq0Dmp|}X0}^W&W}?k~PKK^M$1p0P+rf9nzap5RpV!I8btLe!)q4XxIeR_d^A5Ou=hw zczZ2jIR(H0f?0`y@WE*XF?sk0IGy5ortlf?|B-kjOP?W0(iJLq5bq4KoC3U`mu3+j zWvr*z)c9bvfaL|}vvY+vx_aFv=_O5*Q|AOsoC+4~TUa^|A2}YB@V#TTo&x^Yxh82d zgGB+ePOrBd39xa)Y=-3q<3a1|X*iZvfD+i$aBSdR!o}AUK@A6(1n}D7IBIzrM<7~_ z0+b-Wf*=cXmk zZJ&MC&ttFxWDsIN0u-{)kP7JUN)+-`kt&I7J${4H2$WC2KUb|91lff}0hyVbdbwSV zPPq}@uu&in6UngHK#>*>zXBH|a7zW5+DH~QYPS1AR>1j+b2UqsE_xWU3snL5`Hl8N zhYsynUw7lQRer(*>EOu8$HfTTPLZz&nGIwE85MqW`b=D0Tr^~tnVG3y0VwO%t;3I$ z{q)qSQ){pshz3MkF8fD(7(zDRLpHTFPRh>C{ugBCm0f7XTghEXNl63B%S$U=;t@wf zqS0nNa-!ij4P+o_hD;!vf`a_2goFfaz;`cLu;9mBo_fmd6DCZ+F9Jo+PD`6~^5lss zXZ5Y>Bnp1WEj+)Z=Pl4=haNq8 zM2WxM1rJ3i!Pp@KA&Vi931s7yQ3tQg!dhSv-5C=TbFU~d z;@=MldJ6D+S#24}-~q@4vJwBj^R`>Eib#Q0u_^x~Iy(9nUAuPe)TK+8`#N{-9Mu-V z*dYVR0y6Q+ChRlcS3x7NZ?Vpy(Y6d^09hC!c)QreE_ShtUF>3)A4d5vt#aQ1>f!~a P00000NkvXXu0mjfTgEGV literal 0 HcmV?d00001 diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-xxhdpi/ic_launcher.png b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..fdc20eadd59d1d088034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i~7t_M^7pM!e*Lebn3yKNGMS|xk#63JubjWDRBxwg}#R~P- z2a)Wu;4%}PQA!E!3ladJ!m7!t^st=9s@J)04FRChrmuWPDtL`ItcmCbn x>V*D+`R>{-QvE4nb+#zJn*RU881UW@mGD%$_77q)w{t%NRb|bm6^a(Y{{!1)y3YUr literal 0 HcmV?d00001 diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..8a23b253fd2e5cc2ef4b94a5e504b8b4ad3e005f GIT binary patch literal 7264 zcmb7pXEa=2`1PG(Bn(0HE=2F5Mkjh_bYT!BdPxLPM(@4%PIQ83F-ElLHAr-#_ZFSM z-~avcetXw@);i~Y*=MikuKPUa?0uhb4K;ZjEOIOW0B{r)-e^5OQUA@S7>}#gy!{gZ zpkz{fBL(v?+0TCB4b%D8Hx8N7dAK%}m7M9=i(s3Of_Wt_Mt+E+Hr|$vVpm|NeJd%s z-4j5^i5^ExOWUm>t+~w+lrr{043YJ4(>_#Le^D|t#CE#T?k4UlA;t6RV)2vj;WxL@ z;l$AB|L?(JO_zhNqcIBJ#n6 znV!BdNSdX0JPE<|ZiS|k3%wY8fp*cc)Z$k9Z=tP8qV4mh`_#f*(^^t)8CDY!FR6Th zb?(MVF!Lpb_e+rnOx9D%9p>cnY8bbc|5xev(BAwoRx_4uO7DS*jo+3nAtDD@mdp?H+N?_0iD(yu5}ij1cNe=e zH6t)%#cZg)uh8F&qk^~#&+k`f~Jn%Bvl5v+sAhG2D94BoTW>Muo~ktd3;m4`&KC1;zGscS}B<{`&K$ z!qa8-vND!>kFBmPOmEDtysfP*t`!ST)B2c})|V>2rWz}&tg$)XG|o?q@hWV0m8@0J}U?rMvgIE`aqYfoWVyVRI=wg7bOjBIy;_zIK0#=;12~*`?iIfWz zIV=WxcX!)v$P$85^IxM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>7n%e^k}#e9F7<~q_-R5%TfDiJLtOM110YcIr)Ndd@!Cx4-9_&X6c#rQ zvX4n-<{sQ{d!U3!*Pa(WO*x^lM9dn?_?KCO7hp%`?p#7@*0-%^+5@B3*25XUpl^v8 zIYmj}x1C~Vo$=FDbAAQmh4Q!vr(|}6ue9F7>uxE}QGu~y|7IWV*SY*Wb+1mL6DR*Py)nhly9w0ckf#Lj zOLFfKE%47&CO4KdMN4r2^!HiZw}hJRz!|oq;e6t zUZt#uNI0JEL2@)McMD_14fj?;X*h!;n7{LycZXdNa~L+e=v)pEWYW=9vj+T}Z4%r# zSWFZ9L@Mv9ckDkGZ}iPrCuER`m_3aKpPc-ft4Gfycog+%S?0f>4NmqC1wL^hs9NQT zu$V<}P-wWfYh|T50SPYxT(Q<4TNg%UzIWGEpa1RsW_$Uv2zO1z>*C;!*gFro3O&Mn zY}=qC!MXm2s8C}h`r|kGU%rp(wCYxZ#Ru4%{gsmAw^ygB%o=%;29U74N+WFSM6O8^ z*b;C=bQv}HzfoK!Sx(>AzamsyAR9Rieah|9IiP_bOhOpJLd1T4xfYwM)9bztCE>jN zDh=t4|Bg+g;hm4|4Mwh<;9p{SV<6YIZ&M7f`bR`%5uDIAcm1{=MzWN;9PLY^9F^e0 zuUi|Wn_wCQ7m8__;^_bEK%>DT-~5zmgiczsKAPC#7Rp1(3ehPH2tIvRPDx~y1@#7y zKrX@wCBMveM0WYioB2!D(xm8TG?<*2U>uY7@2x+zmBA=R!7ri~exkX;{}){9VtRB$ z12jqvBI?p2W(_~U$(x8eb(ZkE1pgQERWGjB<^`Yni)JZHvffE1`^`(?^tP{2^=20T ek1^@^fNN2(Q`<8X_t-K707Y4~H`UVcfd2t*sRa!H literal 0 HcmV?d00001 diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/values/colors.xml b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/values/colors.xml new file mode 100644 index 00000000..f8c6127d --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/values/strings.xml b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/values/strings.xml new file mode 100644 index 00000000..6b238fde --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + BlinkID Compose Minimal Sample + \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/values/styles.xml b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/values/styles.xml new file mode 100644 index 00000000..1a9a6bfa --- /dev/null +++ b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/values/styles.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/BlinkIDSample/build.gradle b/BlinkIDSample/build.gradle index ec477ff7..9fa73198 100644 --- a/BlinkIDSample/build.gradle +++ b/BlinkIDSample/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { - kotlin_version = '1.7.20' + kotlin_version = '1.8.0' } repositories { mavenCentral() diff --git a/BlinkIDSample/settings.gradle b/BlinkIDSample/settings.gradle index 9ffa923d..23c5fdd9 100644 --- a/BlinkIDSample/settings.gradle +++ b/BlinkIDSample/settings.gradle @@ -6,6 +6,8 @@ include ':BlinkID_AllRecognizersSample', ':BlinkID-aMinimalSample', ':BlinkID-MinimalSampleAdvanced', ':BlinkID-OverlaySample', + ':BlinkID-ComposeFragmentSample', + ':BlinkID-ComposeMinimalSample', ':LibUtils' // uncomment this line if you have customised build of LibBLinkID //include ':LibBlinkID' From a58c2e1afad54c9fa234aa0a5b2ed228c52fecd4 Mon Sep 17 00:00:00 2001 From: Robert Medvedec Date: Tue, 6 Feb 2024 16:33:00 +0100 Subject: [PATCH 2/5] Update compile and target sdk version from 33 to 34, forced JAVA 17 version for new Compose samples --- .../build.gradle | 15 ++++++--------- .../BlinkID-ComposeMinimalSample/build.gradle | 19 +++++++------------ .../BlinkID-CustomCombinedSample/build.gradle | 2 +- .../BlinkID-CustomUISample/build.gradle | 2 +- .../BlinkID-DirectApiSample/build.gradle | 2 +- .../BlinkID-ImagesSample/build.gradle | 2 +- .../build.gradle | 7 +------ .../BlinkID-OverlaySample/build.gradle | 2 +- .../BlinkID-aMinimalSample/build.gradle | 2 +- .../BlinkID_AllRecognizersSample/build.gradle | 2 +- BlinkIDSample/LibUtils/build.gradle | 2 +- BlinkIDSample/build.gradle | 4 ++-- 12 files changed, 24 insertions(+), 37 deletions(-) diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/build.gradle b/BlinkIDSample/BlinkID-ComposeFragmentSample/build.gradle index 96c475a0..bcc5c857 100644 --- a/BlinkIDSample/BlinkID-ComposeFragmentSample/build.gradle +++ b/BlinkIDSample/BlinkID-ComposeFragmentSample/build.gradle @@ -5,7 +5,7 @@ plugins { android { namespace 'com.microblink.blinkid' - compileSdk 34 + compileSdk rootProject.ext.compileSdkVersion defaultConfig { applicationId "com.microblink.blinkid" @@ -25,20 +25,17 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } composeOptions { kotlinCompilerExtensionVersion = "1.4.0" } + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } buildFeatures { compose = true viewBinding = true } - kotlinOptions { - jvmTarget = '1.8' - } } dependencies { @@ -48,7 +45,7 @@ dependencies { implementation 'androidx.core:core-ktx:1.10.0' implementation 'androidx.compose.material3:material3' implementation 'androidx.appcompat:appcompat:1.6.1' - implementation platform('androidx.compose:compose-bom:2023.05.01') + implementation platform('androidx.compose:compose-bom:2024.01.00') implementation 'androidx.activity:activity-compose:1.8.2' implementation 'androidx.fragment:fragment-ktx:1.6.2' implementation 'androidx.compose.ui:ui-viewbinding:1.5.4' diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/build.gradle b/BlinkIDSample/BlinkID-ComposeMinimalSample/build.gradle index cd695e65..8ee78b2a 100644 --- a/BlinkIDSample/BlinkID-ComposeMinimalSample/build.gradle +++ b/BlinkIDSample/BlinkID-ComposeMinimalSample/build.gradle @@ -5,12 +5,12 @@ plugins { android { namespace 'com.microblink.blinkid' - compileSdk 34 + compileSdk rootProject.ext.compileSdkVersion defaultConfig { applicationId "com.microblink.blinkid" minSdk 21 - targetSdk 34 + targetSdk rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" @@ -25,19 +25,16 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } composeOptions { kotlinCompilerExtensionVersion = "1.4.0" } + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } buildFeatures { compose true } - kotlinOptions { - jvmTarget = '1.8' - } } dependencies { @@ -46,11 +43,9 @@ dependencies { } implementation 'androidx.core:core-ktx:1.10.0' implementation 'androidx.compose.material3:material3' + implementation platform('androidx.compose:compose-bom:2024.01.00') implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.activity:activity-compose:1.8.2' - implementation platform('androidx.compose:compose-bom:2023.05.01') implementation 'androidx.compose.ui:ui' implementation 'androidx.compose.ui:ui-graphics' - - implementation project(':LibUtils') } \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-CustomCombinedSample/build.gradle b/BlinkIDSample/BlinkID-CustomCombinedSample/build.gradle index e125474b..6e39e65a 100644 --- a/BlinkIDSample/BlinkID-CustomCombinedSample/build.gradle +++ b/BlinkIDSample/BlinkID-CustomCombinedSample/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'com.android.application' android { - compileSdkVersion rootProject.ext.compileSdkVersion + compileSdk rootProject.ext.compileSdkVersion defaultConfig { applicationId "com.microblink.blinkid" diff --git a/BlinkIDSample/BlinkID-CustomUISample/build.gradle b/BlinkIDSample/BlinkID-CustomUISample/build.gradle index e0215794..869d14be 100644 --- a/BlinkIDSample/BlinkID-CustomUISample/build.gradle +++ b/BlinkIDSample/BlinkID-CustomUISample/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'com.android.application' android { - compileSdkVersion rootProject.ext.compileSdkVersion + compileSdk rootProject.ext.compileSdkVersion defaultConfig { applicationId "com.microblink.blinkid" diff --git a/BlinkIDSample/BlinkID-DirectApiSample/build.gradle b/BlinkIDSample/BlinkID-DirectApiSample/build.gradle index 110cd0ce..03063a75 100644 --- a/BlinkIDSample/BlinkID-DirectApiSample/build.gradle +++ b/BlinkIDSample/BlinkID-DirectApiSample/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'com.android.application' android { - compileSdkVersion rootProject.ext.compileSdkVersion + compileSdk rootProject.ext.compileSdkVersion defaultConfig { applicationId "com.microblink.blinkid" diff --git a/BlinkIDSample/BlinkID-ImagesSample/build.gradle b/BlinkIDSample/BlinkID-ImagesSample/build.gradle index 09343a07..653dc987 100644 --- a/BlinkIDSample/BlinkID-ImagesSample/build.gradle +++ b/BlinkIDSample/BlinkID-ImagesSample/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'com.android.application' android { - compileSdkVersion rootProject.ext.compileSdkVersion + compileSdk rootProject.ext.compileSdkVersion defaultConfig { applicationId "com.microblink.blinkid" diff --git a/BlinkIDSample/BlinkID-MinimalSampleAdvanced/build.gradle b/BlinkIDSample/BlinkID-MinimalSampleAdvanced/build.gradle index afcb09ba..8000b4f9 100644 --- a/BlinkIDSample/BlinkID-MinimalSampleAdvanced/build.gradle +++ b/BlinkIDSample/BlinkID-MinimalSampleAdvanced/build.gradle @@ -3,8 +3,7 @@ apply plugin: 'org.jetbrains.kotlin.android' apply plugin: 'kotlin-android' android { - namespace 'com.microblink.blinkid' - compileSdk 34 + compileSdk rootProject.ext.compileSdkVersion defaultConfig { applicationId "com.microblink.blinkid" @@ -38,10 +37,6 @@ android { checkReleaseBuilds false } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } } dependencies { diff --git a/BlinkIDSample/BlinkID-OverlaySample/build.gradle b/BlinkIDSample/BlinkID-OverlaySample/build.gradle index 47d0a741..07f9923f 100644 --- a/BlinkIDSample/BlinkID-OverlaySample/build.gradle +++ b/BlinkIDSample/BlinkID-OverlaySample/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'com.android.application' android { - compileSdkVersion rootProject.ext.compileSdkVersion + compileSdk rootProject.ext.compileSdkVersion defaultConfig { applicationId "com.microblink.blinkid" diff --git a/BlinkIDSample/BlinkID-aMinimalSample/build.gradle b/BlinkIDSample/BlinkID-aMinimalSample/build.gradle index a6489e13..3eed1f96 100644 --- a/BlinkIDSample/BlinkID-aMinimalSample/build.gradle +++ b/BlinkIDSample/BlinkID-aMinimalSample/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'org.jetbrains.kotlin.android' apply plugin: 'kotlin-android' android { - compileSdkVersion rootProject.ext.compileSdkVersion + compileSdk rootProject.ext.compileSdkVersion defaultConfig { applicationId "com.microblink.blinkid" diff --git a/BlinkIDSample/BlinkID_AllRecognizersSample/build.gradle b/BlinkIDSample/BlinkID_AllRecognizersSample/build.gradle index 506a8a83..893b66c3 100644 --- a/BlinkIDSample/BlinkID_AllRecognizersSample/build.gradle +++ b/BlinkIDSample/BlinkID_AllRecognizersSample/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'com.android.application' android { - compileSdkVersion rootProject.ext.compileSdkVersion + compileSdk rootProject.ext.compileSdkVersion defaultConfig { applicationId "com.microblink.blinkid" diff --git a/BlinkIDSample/LibUtils/build.gradle b/BlinkIDSample/LibUtils/build.gradle index 053bda3e..ebb5e467 100644 --- a/BlinkIDSample/LibUtils/build.gradle +++ b/BlinkIDSample/LibUtils/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'com.android.library' android { - compileSdkVersion rootProject.ext.compileSdkVersion + compileSdk rootProject.ext.compileSdkVersion defaultConfig { minSdkVersion 21 diff --git a/BlinkIDSample/build.gradle b/BlinkIDSample/build.gradle index 9fa73198..6eb3e911 100644 --- a/BlinkIDSample/build.gradle +++ b/BlinkIDSample/build.gradle @@ -26,7 +26,7 @@ allprojects { project.ext { blinkIdVersion = '6.5.0' - compileSdkVersion = 33 - targetSdkVersion = 33 + compileSdkVersion = 34 + targetSdkVersion = 34 appCompatVersion = '1.6.1' } \ No newline at end of file From 3ab05305445fa2ef5d192755f97eb586fb9fa670 Mon Sep 17 00:00:00 2001 From: Robert Medvedec Date: Tue, 6 Feb 2024 16:33:41 +0100 Subject: [PATCH 3/5] Removed unused colors.xml files, add mb license to ComposeMinimalSample --- .../src/main/res/values/colors.xml | 10 ---------- .../src/main/assets/com.microblink.blinkid.mblic | Bin 0 -> 177 bytes .../src/main/res/values/colors.xml | 10 ---------- 3 files changed, 20 deletions(-) delete mode 100644 BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/colors.xml create mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/assets/com.microblink.blinkid.mblic delete mode 100644 BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/res/values/colors.xml diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/colors.xml b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/colors.xml deleted file mode 100644 index f8c6127d..00000000 --- a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/res/values/colors.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - #FFBB86FC - #FF6200EE - #FF3700B3 - #FF03DAC5 - #FF018786 - #FF000000 - #FFFFFFFF - \ No newline at end of file diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/assets/com.microblink.blinkid.mblic b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/assets/com.microblink.blinkid.mblic new file mode 100644 index 0000000000000000000000000000000000000000..e12c26deccf262dddf183a854d559f73417eecda GIT binary patch literal 177 zcmdle!^9w#oS&$lq;r&Z(@H{*kJza(V^13 - - #FFBB86FC - #FF6200EE - #FF3700B3 - #FF03DAC5 - #FF018786 - #FF000000 - #FFFFFFFF - \ No newline at end of file From 6d444f937d73b1b60fe069f30c1884e835960e53 Mon Sep 17 00:00:00 2001 From: Robert Medvedec Date: Tue, 6 Feb 2024 16:38:35 +0100 Subject: [PATCH 4/5] Update new Compose sample apps --- .../com/microblink/blinkid/MainActivity.kt | 215 +++++++++--------- .../com/microblink/blinkid/MainActivity.kt | 26 ++- 2 files changed, 120 insertions(+), 121 deletions(-) diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/java/com/microblink/blinkid/MainActivity.kt b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/java/com/microblink/blinkid/MainActivity.kt index c4ce91cd..81867bce 100644 --- a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/java/com/microblink/blinkid/MainActivity.kt +++ b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/java/com/microblink/blinkid/MainActivity.kt @@ -5,9 +5,11 @@ import android.content.Context import android.content.res.Configuration import android.os.Bundle import android.widget.Toast +import androidx.activity.ComponentActivity import androidx.activity.compose.BackHandler import androidx.activity.compose.setContent import androidx.appcompat.app.AppCompatActivity +import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -18,10 +20,13 @@ import androidx.compose.material3.Button import androidx.compose.material3.ButtonColors import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Text +import androidx.compose.material3.Scaffold +import androidx.compose.material3.TopAppBar +import androidx.compose.material3.* import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.MutableState -import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -50,36 +55,52 @@ class MainActivity : AppCompatActivity(), RecognizerRunnerFragment.ScanningOverl var mRecognizerRunnerFragment: RecognizerRunnerFragment? = null private var mScanOverlay: BlinkIdOverlayController? = null lateinit var mRecognizerBundle: RecognizerBundle - private lateinit var showScanning: MutableState + private lateinit var currentScreen: MutableState @SuppressLint("RestrictedApi") + @ExperimentalMaterial3Api override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) // setting the license key has to be done in the Application class (in this example it is done through the com.microblink.BlinkIdSampleApp) - - this.run { - setContent { - supportActionBar?.setShowHideAnimationEnabled(false) - showScanning = - rememberSaveable { mutableIntStateOf(0) } - when (showScanning.value) { - 0 -> { - LaunchedEffect(supportActionBar?.isShowing) { - if (supportActionBar?.isShowing == false) supportActionBar?.show() + setContent { + var showTopBar = rememberSaveable { mutableStateOf(true) } + Scaffold( + topBar = { + if (showTopBar.value) { + TopAppBar( + title = { + Text(text = getString(R.string.app_name)) + }, + colors = TopAppBarDefaults.smallTopAppBarColors(containerColor = colorResource(id = R.color.mb_lime)) + )} + } + ) { + currentScreen = + rememberSaveable { mutableStateOf(Screen.HOME) } + Column( + modifier = Modifier + .padding(it) + .fillMaxSize() + .background(colorResource(id = R.color.mb_blue_deep)), + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally + ) { + when (currentScreen.value) { + Screen.HOME -> { + showTopBar.value = true + MainMenu() } - MainMenu() - } - 1 -> { - AndroidViewBindingBlinkIdFragment() - } + Screen.SCANNING -> { + showTopBar.value = false + AndroidViewBindingBlinkIdFragment() + } - 2 -> { - LaunchedEffect(supportActionBar?.isShowing) { - if (supportActionBar?.isShowing == false) supportActionBar?.show() + Screen.RESULTS -> { + showTopBar.value = true + ResultScreen() } - ResultScreen() } } } @@ -116,37 +137,11 @@ class MainActivity : AppCompatActivity(), RecognizerRunnerFragment.ScanningOverl } RecognitionSuccessType.SUCCESSFUL -> { - when (mRecognizerBundle.recognizers[0].result) { - is BlinkIdSingleSideRecognizer.Result -> { - val result = - mRecognizerBundle.recognizers[0].result as BlinkIdSingleSideRecognizer.Result - Toast.makeText( - this@MainActivity, - "The name is " + (result.firstName?.value() - ?: result.fullName?.value()), - Toast.LENGTH_SHORT - ).show() - } - - is BlinkIdMultiSideRecognizer.Result -> { - val result = - mRecognizerBundle.recognizers[0].result as BlinkIdMultiSideRecognizer.Result - Toast.makeText( - this@MainActivity, - "The name is " + (result.firstName?.value() - ?: result.fullName?.value()), - Toast.LENGTH_SHORT - ).show() - } - - else -> { - Toast.makeText( - this@MainActivity, - "Successful scan", - Toast.LENGTH_SHORT - ).show() - } - } + Toast.makeText( + this@MainActivity, + "Successful scan", + Toast.LENGTH_SHORT + ).show() } RecognitionSuccessType.STAGE_SUCCESSFUL -> Toast.makeText( @@ -164,7 +159,7 @@ class MainActivity : AppCompatActivity(), RecognizerRunnerFragment.ScanningOverl supportFragmentManager.beginTransaction().apply { mScanOverlay = null - showScanning.value = 2 + currentScreen.value = Screen.RESULTS }.commit() } @@ -191,76 +186,69 @@ class MainActivity : AppCompatActivity(), RecognizerRunnerFragment.ScanningOverl scanResultListener: ScanResultListener ): BlinkIdOverlayController { val overlayStrings = ReticleOverlayStrings.Builder(this@MainActivity).build() - val settings = BlinkIdUISettings(recognizerBundle).also { - it.setShowFlashlightWarning(true) - it.setShowIntroductionDialog(true) - it.setShowOnboardingInfo(true) - it.setShowMandatoryFieldsMissing(true) - it.setAllowHapticFeedback(true) - it.setStrings(overlayStrings) - it.setOverlayViewStyle(R.style.CustomStyle) + val settings = BlinkIdUISettings(recognizerBundle).apply { + setShowFlashlightWarning(true) + setShowIntroductionDialog(true) + setShowOnboardingInfo(true) + setShowMandatoryFieldsMissing(true) + setAllowHapticFeedback(true) + setStrings(overlayStrings) + setOverlayViewStyle(R.style.CustomStyle) } return settings.createOverlayController(this, scanResultListener) } @Composable fun MainMenu() { - Column( - Modifier.fillMaxSize(), - verticalArrangement = Arrangement.Center, - horizontalAlignment = Alignment.CenterHorizontally - ) { - val mButtonColors: ButtonColors = ButtonDefaults.buttonColors( - containerColor = colorResource(id = R.color.mb_lime), contentColor = colorResource( - id = R.color.mb_blue_deep - ) - ) - Button(colors = mButtonColors, onClick = { - supportActionBar?.hide() - mRecognizerBundle = RecognizerBundle(BlinkIdSingleSideRecognizer()) - showScanning.value = 1 - }) { - Text("SingleSide Scan") - } - Button(colors = mButtonColors, onClick = { - supportActionBar?.hide() - mRecognizerBundle = RecognizerBundle(BlinkIdMultiSideRecognizer()) - showScanning.value = 1 - }) { - Text("MultiSide Scan") - } - + val mButtonColors: ButtonColors = ButtonDefaults.buttonColors( + containerColor = colorResource(id = R.color.mb_lime), + contentColor = colorResource(id = R.color.mb_blue_deep) + ) + Button(colors = mButtonColors, onClick = { + mRecognizerBundle = RecognizerBundle(BlinkIdSingleSideRecognizer()) + currentScreen.value = Screen.SCANNING + }) { + Text("SingleSide Scan") + } + Button(colors = mButtonColors, onClick = { + mRecognizerBundle = RecognizerBundle(BlinkIdMultiSideRecognizer()) + currentScreen.value = Screen.SCANNING + }) { + Text("MultiSide Scan") } } @Composable fun ResultScreen() { - val result = - mRecognizerRunnerFragment?.recognizerRunnerView?.recognizerBundle?.recognizers?.get(0) - Column( - Modifier - .fillMaxSize() - .padding(top = 20.dp), - horizontalAlignment = Alignment.CenterHorizontally, + val mRecognizer = + mRecognizerBundle?.recognizers?.get(0) + + Row( + modifier = Modifier.fillMaxWidth().padding(top = 20.dp), + horizontalArrangement = Arrangement.Center, + verticalAlignment = Alignment.Top ) { - Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.Center) { - result?.name?.let { - Text( - it, - color = colorResource(id = R.color.mb_lime), - fontSize = 20.sp - ) - } + mRecognizer?.name?.let { + Text( + it, + color = colorResource(id = R.color.mb_lime), + fontSize = 20.sp + ) } + } - if (result != null) { - when (result.result) { + Column( + modifier = Modifier + .fillMaxSize() + ) { + if (mRecognizer != null) { + when (mRecognizer.result) { is BlinkIdSingleSideRecognizer.Result -> { - val resultValues = result.result as BlinkIdSingleSideRecognizer.Result + val resultValues = mRecognizer.result as BlinkIdSingleSideRecognizer.Result ResultRow( fieldName = "First name", - result = resultValues.firstName?.value() ?: "" + result = resultValues.firstName?.value() ?: "", ) ResultRow( fieldName = "Last name", @@ -277,7 +265,7 @@ class MainActivity : AppCompatActivity(), RecognizerRunnerFragment.ScanningOverl } is BlinkIdMultiSideRecognizer.Result -> { - val resultValues = result.result as BlinkIdMultiSideRecognizer.Result + val resultValues = mRecognizer.result as BlinkIdMultiSideRecognizer.Result ResultRow( fieldName = "First name", result = resultValues.firstName?.value() ?: "" @@ -299,7 +287,7 @@ class MainActivity : AppCompatActivity(), RecognizerRunnerFragment.ScanningOverl } } BackHandler(true) { - showScanning.value = 0 + currentScreen.value = Screen.HOME } } @@ -310,7 +298,10 @@ class MainActivity : AppCompatActivity(), RecognizerRunnerFragment.ScanningOverl .fillMaxWidth() .padding(start = 10.dp, top = 10.dp) ) { - Text("$fieldName: $result", color = Color.White) + Text( + "$fieldName: $result", + color = colorResource(id = R.color.mb_lime) + ) } } @@ -322,9 +313,15 @@ class MainActivity : AppCompatActivity(), RecognizerRunnerFragment.ScanningOverl } BackHandler(true) { - showScanning.value = 0 + currentScreen.value = Screen.HOME // this is done to reinit overlay when re-starting the scanning (so the introduction dialog is shown again) mScanOverlay = null } } } + +enum class Screen { + HOME, + SCANNING, + RESULTS +} diff --git a/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/java/com/microblink/blinkid/MainActivity.kt b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/java/com/microblink/blinkid/MainActivity.kt index c1f5fc6e..1224632f 100644 --- a/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/java/com/microblink/blinkid/MainActivity.kt +++ b/BlinkIDSample/BlinkID-ComposeMinimalSample/src/main/java/com/microblink/blinkid/MainActivity.kt @@ -10,7 +10,6 @@ import androidx.appcompat.app.AppCompatActivity import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.padding import androidx.compose.material3.Button import androidx.compose.material3.ButtonColors import androidx.compose.material3.ButtonDefaults @@ -19,10 +18,9 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.colorResource -import androidx.compose.ui.unit.dp import com.microblink.blinkid.activity.result.ResultStatus import com.microblink.blinkid.activity.result.contract.MbScan -import com.microblink.blinkid.activity.result.contract.OneSideDocumentScan +import com.microblink.blinkid.activity.result.contract.TwoSideDocumentScan import com.microblink.blinkid.entities.recognizers.Recognizer import com.microblink.blinkid.entities.recognizers.RecognizerBundle import com.microblink.blinkid.entities.recognizers.blinkid.generic.BlinkIdMultiSideRecognizer @@ -43,9 +41,7 @@ class MainActivity : AppCompatActivity() { val blinkIdCustomLauncher = createBlinkIdCustomLauncher(this) Column( modifier = Modifier - .padding(20.dp) - .fillMaxSize() - .padding(20.dp), + .fillMaxSize(), verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally ) { @@ -68,13 +64,13 @@ class MainActivity : AppCompatActivity() { @Composable fun createBlinkIdSimpleLauncher(context: Context): () -> Unit { - // OneSideDocumentScan() can also be replaced with TwoSideDocumentScan() for simple multi-side scanning - val launcher = rememberLauncherForActivityResult(OneSideDocumentScan()) { blinkIdResult -> + // TwoSideDocumentScan() can also be replaced with OneSideDocumentScan() for simple single-side scanning + val launcher = rememberLauncherForActivityResult(TwoSideDocumentScan()) { blinkIdResult -> if (blinkIdResult.resultStatus == ResultStatus.FINISHED && blinkIdResult.result != null) { Toast.makeText( context, - "The name is " + (blinkIdResult.result!!.firstName?.value() - ?: blinkIdResult.result!!.fullName?.value()), + "The name is " + (blinkIdResult.result?.firstName?.value() + ?: blinkIdResult.result?.fullName?.value()), Toast.LENGTH_SHORT ).show() } else if (blinkIdResult.resultStatus == ResultStatus.CANCELLED) { @@ -91,7 +87,9 @@ fun createBlinkIdSimpleLauncher(context: Context): () -> Unit { @Composable fun createBlinkIdCustomLauncher(context: Context): () -> Unit { val barcodeRecognizer = IdBarcodeRecognizer() - val multiSideRecognizer = BlinkIdMultiSideRecognizer() + val multiSideRecognizer = BlinkIdMultiSideRecognizer().apply { + setSaveCameraFrames(true) + } val recognizerBundle = RecognizerBundle(barcodeRecognizer, multiSideRecognizer) var name = "" var source = "" @@ -134,5 +132,9 @@ fun createBlinkIdCustomLauncher(context: Context): () -> Unit { ).show() } } - return { launcher.launch(BlinkIdUISettings(recognizerBundle)) } + val uiSettings = BlinkIdUISettings(recognizerBundle).apply { + setDocumentDataMatchRequired(true) + } + + return { launcher.launch(uiSettings) } } \ No newline at end of file From 5a3d210f51866290d6049b7cb5da773cbf4a5334 Mon Sep 17 00:00:00 2001 From: Robert Medvedec Date: Wed, 7 Feb 2024 10:38:08 +0100 Subject: [PATCH 5/5] Minor changes --- .../main/java/com/microblink/blinkid/MainActivity.kt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/java/com/microblink/blinkid/MainActivity.kt b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/java/com/microblink/blinkid/MainActivity.kt index 81867bce..ac118f58 100644 --- a/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/java/com/microblink/blinkid/MainActivity.kt +++ b/BlinkIDSample/BlinkID-ComposeFragmentSample/src/main/java/com/microblink/blinkid/MainActivity.kt @@ -5,7 +5,6 @@ import android.content.Context import android.content.res.Configuration import android.os.Bundle import android.widget.Toast -import androidx.activity.ComponentActivity import androidx.activity.compose.BackHandler import androidx.activity.compose.setContent import androidx.appcompat.app.AppCompatActivity @@ -24,13 +23,11 @@ import androidx.compose.material3.Scaffold import androidx.compose.material3.TopAppBar import androidx.compose.material3.* import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.MutableState import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.colorResource import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp @@ -54,7 +51,7 @@ class MainActivity : AppCompatActivity(), RecognizerRunnerFragment.ScanningOverl var mRecognizerRunnerFragment: RecognizerRunnerFragment? = null private var mScanOverlay: BlinkIdOverlayController? = null - lateinit var mRecognizerBundle: RecognizerBundle + private lateinit var mRecognizerBundle: RecognizerBundle private lateinit var currentScreen: MutableState @SuppressLint("RestrictedApi") @@ -72,7 +69,7 @@ class MainActivity : AppCompatActivity(), RecognizerRunnerFragment.ScanningOverl title = { Text(text = getString(R.string.app_name)) }, - colors = TopAppBarDefaults.smallTopAppBarColors(containerColor = colorResource(id = R.color.mb_lime)) + colors = TopAppBarDefaults.topAppBarColors(containerColor = colorResource(id = R.color.mb_lime)) )} } ) { @@ -180,7 +177,7 @@ class MainActivity : AppCompatActivity(), RecognizerRunnerFragment.ScanningOverl return BlinkIdOverlayController(overlaySettings, scanResultListener, reticleOverlay) } - // can be used just like the previous function + // may be used instead of the previous function private fun createOverlayController( recognizerBundle: RecognizerBundle, scanResultListener: ScanResultListener @@ -314,7 +311,7 @@ class MainActivity : AppCompatActivity(), RecognizerRunnerFragment.ScanningOverl BackHandler(true) { currentScreen.value = Screen.HOME - // this is done to reinit overlay when re-starting the scanning (so the introduction dialog is shown again) + // re-initialize the overlay when restarting the scanning (so the introduction dialog is shown again) mScanOverlay = null } }