diff --git a/.github/workflows/bank-sdk.check.yml b/.github/workflows/bank-sdk.check.yml
index 90cb7c549b..e69af11334 100644
--- a/.github/workflows/bank-sdk.check.yml
+++ b/.github/workflows/bank-sdk.check.yml
@@ -141,7 +141,7 @@ jobs:
- name: archive debug screen api example app
uses: actions/upload-artifact@v3
with:
- name: example-app-debug
+ name: bank-sdk-example-app-debug
path: bank-sdk/example-app/build/outputs/apk/debug
- name: build release screen api example app
@@ -157,7 +157,7 @@ jobs:
- name: archive release screen api example app
uses: actions/upload-artifact@v3
with:
- name: example-app-release
+ name: bank-sdk-example-app-release
path: bank-sdk/example-app/build/outputs/apk/release
android-lint:
diff --git a/bank-sdk/example-app/src/main/java/net/gini/android/bank/sdk/exampleapp/ui/ConfigurationActivity.kt b/bank-sdk/example-app/src/main/java/net/gini/android/bank/sdk/exampleapp/ui/ConfigurationActivity.kt
index 134fca3ea1..c48260132f 100644
--- a/bank-sdk/example-app/src/main/java/net/gini/android/bank/sdk/exampleapp/ui/ConfigurationActivity.kt
+++ b/bank-sdk/example-app/src/main/java/net/gini/android/bank/sdk/exampleapp/ui/ConfigurationActivity.kt
@@ -19,7 +19,6 @@ import net.gini.android.bank.sdk.exampleapp.ui.MainActivity.Companion.CAMERA_PER
import net.gini.android.bank.sdk.exampleapp.ui.MainActivity.Companion.CONFIGURATION_BUNDLE
import net.gini.android.bank.sdk.exampleapp.ui.data.Configuration
import net.gini.android.capture.DocumentImportEnabledFileTypes
-import net.gini.android.capture.EntryPoint
import net.gini.android.capture.internal.util.ActivityHelper.interceptOnBackPressed
@AndroidEntryPoint
@@ -184,13 +183,6 @@ class ConfigurationActivity : AppCompatActivity() {
// 29 set imported file size bytes limit
binding.editTextImportedFileSizeBytesLimit.hint =
configuration.importedFileSizeBytesLimit.toString()
- // 30 entry point
- val checkedEntryPointButtonId = when (configuration.entryPoint) {
- EntryPoint.BUTTON -> R.id.btn_buttonEntryPoint
- EntryPoint.FIELD -> R.id.btn_fieldEntryPoint
- else -> R.id.btn_buttonEntryPoint
- }
- binding.toggleBtnEntryPoint.check(checkedEntryPointButtonId)
// 31 enable return assistant
binding.switchReturnAssistantFeature.isChecked = configuration.isReturnAssistantEnabled
@@ -507,26 +499,6 @@ class ConfigurationActivity : AppCompatActivity() {
)
}
- // 30 entry point
- binding.toggleBtnEntryPoint.addOnButtonCheckedListener { toggleButton, checkedId, isChecked ->
- val checked = toggleButton.checkedButtonId
- configurationViewModel.setConfiguration(
- when (checked) {
- R.id.btn_buttonEntryPoint -> configurationViewModel.configurationFlow.value.copy(
- entryPoint = EntryPoint.BUTTON
- )
-
- R.id.btn_fieldEntryPoint -> configurationViewModel.configurationFlow.value.copy(
- entryPoint = EntryPoint.FIELD
- )
-
- else -> configurationViewModel.configurationFlow.value.copy(
- entryPoint = EntryPoint.BUTTON
- )
- }
- )
- }
-
// 31 enable return assistant
binding.switchReturnAssistantFeature.setOnCheckedChangeListener { _, isChecked ->
configurationViewModel.setConfiguration(
diff --git a/bank-sdk/example-app/src/main/java/net/gini/android/bank/sdk/exampleapp/ui/MainActivity.kt b/bank-sdk/example-app/src/main/java/net/gini/android/bank/sdk/exampleapp/ui/MainActivity.kt
index 5d6aa51840..07a0beafd8 100644
--- a/bank-sdk/example-app/src/main/java/net/gini/android/bank/sdk/exampleapp/ui/MainActivity.kt
+++ b/bank-sdk/example-app/src/main/java/net/gini/android/bank/sdk/exampleapp/ui/MainActivity.kt
@@ -4,7 +4,6 @@ import android.Manifest
import android.annotation.SuppressLint
import android.content.Intent
import android.os.Bundle
-import android.view.View
import android.widget.Toast
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
@@ -17,11 +16,11 @@ import net.gini.android.bank.sdk.capture.CaptureFlowContract
import net.gini.android.bank.sdk.capture.CaptureFlowImportContract
import net.gini.android.bank.sdk.capture.CaptureResult
import net.gini.android.bank.sdk.capture.ResultError
-import net.gini.android.bank.sdk.exampleapp.BuildConfig
import net.gini.android.bank.sdk.exampleapp.R
import net.gini.android.bank.sdk.exampleapp.core.PermissionHandler
import net.gini.android.bank.sdk.exampleapp.databinding.ActivityMainBinding
import net.gini.android.bank.sdk.exampleapp.ui.data.Configuration
+import net.gini.android.capture.EntryPoint
import net.gini.android.capture.requirements.RequirementsReport
import net.gini.android.capture.util.CancellationToken
@@ -89,16 +88,20 @@ class MainActivity : AppCompatActivity() {
@SuppressLint("SetTextI18n")
private fun showVersions() {
binding.textGiniBankVersion.text =
- getString(R.string.gini_capture_sdk_version) + BuildConfig.VERSION_NAME
+ getString(R.string.gini_bank_sdk_version) + net.gini.android.bank.sdk.BuildConfig.VERSION_NAME +
+ getString(R.string.gini_capture_sdk_version) + net.gini.android.capture.BuildConfig.VERSION_NAME +
+ getString(R.string.gini_client_id) + getString(R.string.gini_api_client_id)
+
}
private fun addInputHandlers() {
- binding.buttonStartScanner.setOnClickListener { v: View? ->
- if (configurationViewModel.disableCameraPermissionFlow.value) {
- startGiniCaptureSdk()
- } else {
- checkCameraPermission()
- }
+ binding.buttonStartScanner.setOnClickListener {
+ checkIfAppShouldAskForCameraPermission(EntryPoint.BUTTON)
+ }
+
+ binding.tilFieldEntryPoint.setEndIconOnClickListener {
+ checkIfAppShouldAskForCameraPermission(EntryPoint.FIELD)
+
}
binding.textGiniBankVersion.setOnClickListener {
@@ -120,6 +123,19 @@ class MainActivity : AppCompatActivity() {
}
+ private fun checkIfAppShouldAskForCameraPermission(entryPoint: EntryPoint) {
+ configurationViewModel.setConfiguration(
+ configurationViewModel.configurationFlow.value.copy(
+ entryPoint = entryPoint
+ )
+ )
+ if (configurationViewModel.disableCameraPermissionFlow.value) {
+ startGiniCaptureSdk()
+ } else {
+ checkCameraPermission()
+ }
+ }
+
private fun checkCameraPermission(intent: Intent? = null) {
lifecycleScope.launch {
if (permissionHandler.grantPermission(Manifest.permission.CAMERA)) {
diff --git a/bank-sdk/example-app/src/main/res/color/text_input_layout_stroke_color.xml b/bank-sdk/example-app/src/main/res/color/text_input_layout_stroke_color.xml
new file mode 100644
index 0000000000..5184a8e46f
--- /dev/null
+++ b/bank-sdk/example-app/src/main/res/color/text_input_layout_stroke_color.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/bank-sdk/example-app/src/main/res/drawable/gini_logo.xml b/bank-sdk/example-app/src/main/res/drawable/gini_logo.xml
new file mode 100644
index 0000000000..6629120b64
--- /dev/null
+++ b/bank-sdk/example-app/src/main/res/drawable/gini_logo.xml
@@ -0,0 +1,14 @@
+
+
+
+
diff --git a/bank-sdk/example-app/src/main/res/drawable/ic_camera.xml b/bank-sdk/example-app/src/main/res/drawable/ic_camera.xml
new file mode 100644
index 0000000000..8e93524689
--- /dev/null
+++ b/bank-sdk/example-app/src/main/res/drawable/ic_camera.xml
@@ -0,0 +1,22 @@
+
+
+
+
diff --git a/bank-sdk/example-app/src/main/res/layout/activity_configuration.xml b/bank-sdk/example-app/src/main/res/layout/activity_configuration.xml
index bd5a738098..e5873ef84a 100644
--- a/bank-sdk/example-app/src/main/res/layout/activity_configuration.xml
+++ b/bank-sdk/example-app/src/main/res/layout/activity_configuration.xml
@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context="net.gini.android.bank.exampleapp.ui.ConfigurationActivity">
+ tools:context=".ui.ConfigurationActivity">
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/bank-sdk/example-app/src/main/res/layout/activity_custom_help.xml b/bank-sdk/example-app/src/main/res/layout/activity_custom_help.xml
index 0c2c0870a1..c82357ba23 100644
--- a/bank-sdk/example-app/src/main/res/layout/activity_custom_help.xml
+++ b/bank-sdk/example-app/src/main/res/layout/activity_custom_help.xml
@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context="net.gini.android.bank.exampleapp.ui.CustomHelpActivity">
+ tools:context=".ui.CustomHelpActivity">
+ tools:context=".ui.ExtractionsActivity">
diff --git a/bank-sdk/example-app/src/main/res/layout/activity_main.xml b/bank-sdk/example-app/src/main/res/layout/activity_main.xml
index b727b48a6f..0ec5832858 100644
--- a/bank-sdk/example-app/src/main/res/layout/activity_main.xml
+++ b/bank-sdk/example-app/src/main/res/layout/activity_main.xml
@@ -3,47 +3,119 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingLeft="@dimen/activity_horizontal_margin"
- android:paddingTop="@dimen/activity_horizontal_margin"
- android:paddingRight="@dimen/activity_horizontal_margin"
- android:paddingBottom="@dimen/activity_horizontal_margin"
- tools:context="net.gini.android.bank.exampleapp.ui.MainActivity">
-
-
-
-
-
-
-
-
-
+ android:layout_height="match_parent">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/bank-sdk/example-app/src/main/res/values-en/strings.xml b/bank-sdk/example-app/src/main/res/values-en/strings.xml
new file mode 100644
index 0000000000..49475315eb
--- /dev/null
+++ b/bank-sdk/example-app/src/main/res/values-en/strings.xml
@@ -0,0 +1,10 @@
+
+
+ Welcome to Gini
+ or use
+ Photopayment
+ Example of Photo Payment integration in the banking app
+ Enter your IBAN code
+
+
+
diff --git a/bank-sdk/example-app/src/main/res/values-night/colors.xml b/bank-sdk/example-app/src/main/res/values-night/colors.xml
new file mode 100644
index 0000000000..e071e28b2e
--- /dev/null
+++ b/bank-sdk/example-app/src/main/res/values-night/colors.xml
@@ -0,0 +1,16 @@
+
+
+ @color/gc_dark_01
+ @color/gc_dark_02
+ @color/gc_dark_03
+ @color/gc_dark_04
+ @color/gc_dark_05
+ @color/gc_dark_06
+
+ @color/gc_light_01
+ @color/gc_light_02
+ @color/gc_light_03
+ @color/gc_light_04
+ @color/gc_light_05
+ @color/gc_light_06
+
diff --git a/bank-sdk/example-app/src/main/res/values/colors.xml b/bank-sdk/example-app/src/main/res/values/colors.xml
index 8dcd7ec0ca..d28d9f100f 100644
--- a/bank-sdk/example-app/src/main/res/values/colors.xml
+++ b/bank-sdk/example-app/src/main/res/values/colors.xml
@@ -1,7 +1,16 @@
- #009edc
- #017dae
- #009edc
- #ffffff
+ @color/gc_light_01
+ @color/gc_light_02
+ @color/gc_light_03
+ @color/gc_light_04
+ @color/gc_light_05
+ @color/gc_light_06
+
+ @color/gc_dark_01
+ @color/gc_dark_02
+ @color/gc_dark_03
+ @color/gc_dark_04
+ @color/gc_dark_05
+ @color/gc_dark_06
diff --git a/bank-sdk/example-app/src/main/res/values/dimens.xml b/bank-sdk/example-app/src/main/res/values/dimens.xml
index ed24d82ed5..2788879eca 100644
--- a/bank-sdk/example-app/src/main/res/values/dimens.xml
+++ b/bank-sdk/example-app/src/main/res/values/dimens.xml
@@ -1,5 +1,19 @@
+ 4dp
+ 8dp
+ 12dp
+ 16dp
+ 20dp
+ 24dp
+ 32dp
+ 48dp
+ 64dp
+ 72dp
+ 80dp
+ 96dp
+
+
16dp
16dp
16dp
diff --git a/bank-sdk/example-app/src/main/res/values/strings.xml b/bank-sdk/example-app/src/main/res/values/strings.xml
index 2c82636243..70934c3cd8 100644
--- a/bank-sdk/example-app/src/main/res/values/strings.xml
+++ b/bank-sdk/example-app/src/main/res/values/strings.xml
@@ -7,8 +7,11 @@
Extractions
No Extractions
- Start Gini Capture SDK
-
+ Willkommen bei Gini
+ oder nutzen Sie die
+ Fotoüberweisung
+ Beispiel für die Integration von Fotoüberweisung in der Banking-App
+ Geben Sie Ihre IBAN ein
Send Feedback and Close
View Picture
Diese Datei ist leider größer als 5MB.
@@ -35,7 +38,9 @@
Custom loading indicator animation
Do not request camera permission
Show custom help item
- Gini Bank SDK v
+ Gini Bank SDK v:
+ \nGini Capture SDK v:
+ \nClient Id:
Configuration
@@ -100,9 +105,6 @@
Imported File Size Bytes Limit
`File import` feature is currently disabled. If you want to test this, please enable it in Gini configuration.
Debug mode
- Entry Point
- Button
- Field
recipient
IBAN
diff --git a/bank-sdk/example-app/src/main/res/values/styles.xml b/bank-sdk/example-app/src/main/res/values/styles.xml
index ea6da63cc1..8d64b1c0ec 100644
--- a/bank-sdk/example-app/src/main/res/values/styles.xml
+++ b/bank-sdk/example-app/src/main/res/values/styles.xml
@@ -1,65 +1,63 @@
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
+
-
-
-
-
-
-
+
diff --git a/capture-sdk/sdk/src/main/res/values/dimens.xml b/capture-sdk/sdk/src/main/res/values/dimens.xml
index c832826c0a..5df009e8f0 100644
--- a/capture-sdk/sdk/src/main/res/values/dimens.xml
+++ b/capture-sdk/sdk/src/main/res/values/dimens.xml
@@ -3,7 +3,6 @@
8dp
12dp
16dp
- 16dp
24dp
32dp
48dp