diff --git a/bank-api-library/library/src/test/java/net/gini/android/bank/api/BankApiDocumentRemoteSourceTest.kt b/bank-api-library/library/src/test/java/net/gini/android/bank/api/BankApiDocumentRemoteSourceTest.kt index f8606e91fa..35bcdd2d90 100644 --- a/bank-api-library/library/src/test/java/net/gini/android/bank/api/BankApiDocumentRemoteSourceTest.kt +++ b/bank-api-library/library/src/test/java/net/gini/android/bank/api/BankApiDocumentRemoteSourceTest.kt @@ -11,6 +11,7 @@ import kotlinx.coroutines.test.runTest import net.gini.android.bank.api.models.ResolvePaymentInput import net.gini.android.bank.api.requests.ErrorEvent import net.gini.android.bank.api.requests.ResolvePaymentBody +import net.gini.android.bank.api.response.ConfigurationResponse import net.gini.android.bank.api.response.ResolvePaymentResponse import net.gini.android.core.api.response.PaymentRequestResponse import net.gini.android.core.api.response.PaymentResponse diff --git a/capture-sdk/sdk/src/main/java/net/gini/android/capture/GiniCaptureFragment.kt b/capture-sdk/sdk/src/main/java/net/gini/android/capture/GiniCaptureFragment.kt index a4089ad34b..5d2338cd34 100644 --- a/capture-sdk/sdk/src/main/java/net/gini/android/capture/GiniCaptureFragment.kt +++ b/capture-sdk/sdk/src/main/java/net/gini/android/capture/GiniCaptureFragment.kt @@ -4,6 +4,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import android.widget.Toast import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentFactory import androidx.navigation.NavController @@ -30,6 +31,7 @@ import net.gini.android.capture.tracking.useranalytics.UserAnalytics import net.gini.android.capture.tracking.useranalytics.properties.UserAnalyticsEventSuperProperty import net.gini.android.capture.tracking.useranalytics.properties.UserAnalyticsUserProperty import net.gini.android.capture.tracking.useranalytics.tracker.AmplitudeUserAnalyticsEventTracker +import org.slf4j.LoggerFactory import java.util.UUID @@ -130,6 +132,9 @@ class GiniCaptureFragment(private val openWithDocument: Document? = null) : navController = (childFragmentManager.fragments[0]).findNavController() oncePerInstallEventStore = OncePerInstallEventStore(requireContext()) setAnalyticsEntryPointProperty(openWithDocument != null) + Toast.makeText(requireContext(), "!!!!!!!!", Toast.LENGTH_LONG) + LOG.error("OnViewCreated shouldShowOnboarding: ${shouldShowOnboarding()} onoboardingOnFirstRun ${shouldShowOnboardingAtFirstRun()}" + + " eventStore ${oncePerInstallEventStore.containsEvent(OncePerInstallEvent.SHOW_ONBOARDING)} getEventStore ${oncePerInstallEventStore.getEV(OncePerInstallEvent.SHOW_ONBOARDING)}") if (openWithDocument != null) { navController.navigate( CameraFragmentDirections.toAnalysisFragment( @@ -137,14 +142,17 @@ class GiniCaptureFragment(private val openWithDocument: Document? = null) : "" ) ) + LOG.error("IFBRANCH") } else { - if (shouldShowOnboarding() || (shouldShowOnboardingAtFirstRun() && !oncePerInstallEventStore.containsEvent( - OncePerInstallEvent.SHOW_ONBOARDING - )) - ) { - oncePerInstallEventStore.saveEvent(OncePerInstallEvent.SHOW_ONBOARDING) +// if (shouldShowOnboarding() || (shouldShowOnboardingAtFirstRun() && !oncePerInstallEventStore.containsEvent( +// OncePerInstallEvent.SHOW_ONBOARDING +// )) +// ) { + LOG.error("OnViewCreated trying navigate") + + oncePerInstallEventStore.saveEvent(OncePerInstallEvent.SHOW_ONBOARDING) navController.navigate(CameraFragmentDirections.toOnboardingFragment()) - } +// } } } @@ -265,6 +273,7 @@ class GiniCaptureFragment(private val openWithDocument: Document? = null) : } companion object { + private val LOG = LoggerFactory.getLogger(GiniCaptureFragment::class.java) @JvmStatic fun createInstance(document: Document? = null): GiniCaptureFragment { return GiniCaptureFragment(document) diff --git a/capture-sdk/sdk/src/main/java/net/gini/android/capture/OncePerInstallEventStore.java b/capture-sdk/sdk/src/main/java/net/gini/android/capture/OncePerInstallEventStore.java index 373f04984b..b149f6be90 100644 --- a/capture-sdk/sdk/src/main/java/net/gini/android/capture/OncePerInstallEventStore.java +++ b/capture-sdk/sdk/src/main/java/net/gini/android/capture/OncePerInstallEventStore.java @@ -30,6 +30,10 @@ public boolean containsEvent(final OncePerInstallEvent event) { return mSharedPreferences.contains(event.name()); } + public boolean getEV(final OncePerInstallEvent event) { + return mSharedPreferences.getBoolean(event.name(), false); + } + public void saveEvent(final OncePerInstallEvent event) { mSharedPreferences.edit() .putBoolean(event.name(), true) diff --git a/capture-sdk/sdk/src/main/java/net/gini/android/capture/camera/CameraFragmentImpl.java b/capture-sdk/sdk/src/main/java/net/gini/android/capture/camera/CameraFragmentImpl.java index c8a015ec76..9d8fa22a4a 100644 --- a/capture-sdk/sdk/src/main/java/net/gini/android/capture/camera/CameraFragmentImpl.java +++ b/capture-sdk/sdk/src/main/java/net/gini/android/capture/camera/CameraFragmentImpl.java @@ -451,6 +451,9 @@ public void onStart() { if (isQRCodeScanningEnabled()) { initQRCodeReader(); } + LOG.error("Checking if we init ibanRecognizeFilter hasInstance " + GiniCapture.hasInstance() + + " getEntryPoint " + GiniCapture.getInstance().getEntryPoint() + + " isOnlyQrCodeScanningEnabled " + isOnlyQRCodeScanningEnabled()); if (GiniCapture.hasInstance() && GiniCapture.getInstance().getEntryPoint() == EntryPoint.FIELD && !isOnlyQRCodeScanningEnabled()) { @@ -589,6 +592,7 @@ public void onInterrupted() { } private void initIBANRecognizerFilter() { + LOG.error("init ibanRecognizerFilter " + ibanRecognizerFilter); if (ibanRecognizerFilter != null) { return; } @@ -873,6 +877,8 @@ private boolean isOnlyQRCodeScanningEnabled() { return false; } + LOG.error("qrcodeScanningEnabling function isOnlyQRCodeScanning " + GiniCapture.getInstance().isOnlyQRCodeScanning() + + " isQRCodeScanningEnabled " + GiniCapture.getInstance().isQRCodeScanningEnabled()); return GiniCapture.getInstance().isOnlyQRCodeScanning() && GiniCapture.getInstance().isQRCodeScanningEnabled(); } @@ -1877,12 +1883,14 @@ public void onPreviewFrame(@NonNull Image image, @NonNull Size imageSize, int ro @Override public void onPreviewFrame(@NonNull byte[] image, @NonNull Size imageSize, int rotation) { + LOG.error("OnPreviewFrame " + ibanRecognizerFilter.toString()); if (mPaymentQRCodeReader != null) { mPaymentQRCodeReader.readFromByteArray(image, imageSize, rotation); } if (ibanRecognizerFilter != null) { + LOG.error("RecognizeFilter if"); try { - ibanRecognizerFilter.processByteArray(image, imageSize.width, imageSize.height, rotation, () -> { + ibanRecognizerFilter.processByteArray(image, 600, 600, rotation, () -> { }); } catch (Exception e) { LOG.error("Failed to process image for IBAN recognition", e); diff --git a/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/textrecognition/MLKitTextRecognizer.kt b/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/textrecognition/MLKitTextRecognizer.kt index b80ccf21fd..8cccacd7ff 100644 --- a/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/textrecognition/MLKitTextRecognizer.kt +++ b/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/textrecognition/MLKitTextRecognizer.kt @@ -66,6 +66,7 @@ internal class MLKitTextRecognizer(private val recognizer: com.google.mlkit.visi doneCallback: (RecognizedText?) -> Unit, cancelledCallback: () -> Unit ) { + LOG.error("ProcessByteArray width $width height $height") if (processingTask != null) { LOG.warn("Text recognizer is already processing an image") cancelledCallback() @@ -91,7 +92,7 @@ internal class MLKitTextRecognizer(private val recognizer: com.google.mlkit.visi private fun handleProcessingTask(doneCallback: (RecognizedText?) -> Unit) { processingTask ?.addOnSuccessListener { result -> - LOG.debug("Text recognizer success: {}", result.text) + LOG.error("Text recognizer success: {}", result.text) doneCallback(mlKitTextToRecognizedText(result)) } ?.addOnFailureListener { e -> diff --git a/capture-sdk/sdk/src/main/java/net/gini/android/capture/onboarding/OnboardingFragment.java b/capture-sdk/sdk/src/main/java/net/gini/android/capture/onboarding/OnboardingFragment.java index 9fd63d4a5b..96c0f53080 100644 --- a/capture-sdk/sdk/src/main/java/net/gini/android/capture/onboarding/OnboardingFragment.java +++ b/capture-sdk/sdk/src/main/java/net/gini/android/capture/onboarding/OnboardingFragment.java @@ -117,6 +117,7 @@ public View onCreateView(final LayoutInflater inflater, final ViewGroup containe bindViews(view); addInputHandlers(); mPresenter.start(); + LOG.error("CreateView"); return view; }