BlinkReceipt / blinkreceipt-android

MIT License
48 stars 16 forks source link

Realtime feedback on receipt data is not displayed after first scan #91

Closed vtn-dev-manish closed 3 weeks ago

vtn-dev-manish commented 2 months ago

If we use the new Blink UI with ScanCharacteristics

 val options =  CameraRecognizerOptions.Builder().options(scanOptions.build())
                                .characteristics(
                                    CameraCharacteristics.Builder().style(R.style.AppThemeBlink)
                                        .cameraPermission(true)
                                        .scanCharacteristics(
                                            ScanCharacteristics.Builder()
                                                .total(true)
                                                .merchant(true)
                                                .date(true)
                                                .build()
                                        )
                                        .tooltipCharacteristics(
                                            TooltipCharacteristics.Builder()
                                                .displayTooltips(true)
                                                .build()
                                        )
                                        .build()
                                ).build()
                        launcher.launch(options)

The real time feedback on receipt data is only available on first run and after app relaunch. Although this feedback is available after the image is captured by the camera but not before the capturing of the receipt image.

Without taking picture

https://github.com/BlinkReceipt/blinkreceipt-android/assets/163402036/b724a180-d251-4b2a-a452-12f55ccc5f78

After taking picture https://github.com/BlinkReceipt/blinkreceipt-android/assets/163402036/4b3f4440-aee0-44d2-87a1-8fd13fe490b9

acparisi commented 1 month ago

@vtn-dev-manish after doing a deeper dive with the team, we think we may understand what the issue is, but we had a couple of questions

But it would be helpful to understand exact steps to reproduce and the expected the results.

acparisi commented 1 month ago

@vtn-dev-manish - can you test this with version 1.8.2 on Android? It includes some additional improvements. This is the expected flow

  1. User initiates scan session
  2. User snaps photo of receipt image Expected: date, time, merchant should only be returned post image capture
vtn-dev-manish commented 1 month ago

HI @acparisi I am again sharing the link of the video where the chips that indicate date, time and merchant in the UI appeared before we were actually clicking the picture https://github.com/BlinkReceipt/blinkreceipt-android/assets/163402036/4b3f4440-aee0-44d2-87a1-8fd13fe490b9

Also as you have now suggested that it was a bug and fixed in release 1.8.2, my concern is that is it also disabled now in the IOS sdk, becasuse eariler it was working everytime on IOS sdk and only once in android. If its still there in IOS sdk then we will see inconsistant behaviour in our android and IOS app which we donot intend.

acparisi commented 1 month ago

Hi @vtn-dev-manish the expected and intended behavior on both iOS and Android is that chips that indicate date, time and merchant in the UI should only appear once a user has taken a photo. A behavior deviating from that flow would be a bug in the SDK. Are you able to validate experience on v1.8.2?

vtn-dev-manish commented 1 month ago

Hi @acparisi I tested 1.8.2 and the issue still exists. It is visible on first scan and not in subsequent scans. If we kill the app and start again then also the issue occurs again

acparisi commented 1 month ago

thank you for the update @vtn-dev-manish. since we are unable to reproduce it in our internal dev app, we’d like to request a sample project with the same exact SDK implementation which we can reproduce the issue. are you able to provide this?

vtn-dev-manish commented 1 month ago

Hi @acparisi regarding sharing of codebase, it will take a good amount of time for approvals. So I would suggest if you can provide your internal app codebase like you have already shared the same for other features in the demo repository. We will test it at our end and check for the necessary changes at our end. It will save your time that will be needed to debug our codebase.

pequots34 commented 1 month ago

Hey @acparisi @vtn-dev-manish, I recommend collaborating on a joint code base to triage the camera issue. We can use the public demo https://github.com/BlinkReceipt/blinkreceipt-android/tree/master/blinkreceipt-demo/BlinkReceiptStaticScan

@vtn-dev-manish, please share the devices you are testing on and mirror BlinkReceiptStaticScan as closely as possible to your integration. In the meantime, our engineering team will run the public demo through our suite of instrumentation tests to try to reproduce the issue across different device families.

acparisi commented 4 weeks ago

@vtn-dev-manish have you been able to reproduce the issue using the public demo app? https://github.com/BlinkReceipt/blinkreceipt-android/tree/master/blinkreceipt-demo/BlinkReceiptStaticScan

vtn-dev-manish commented 3 weeks ago

Hi @pequots34 and @acparisi I am able to reproduce this issue on your sample app as well. Sharing a video with you. https://drive.google.com/file/d/19rpZEhF7sz4BCrz2U1nKEozqDDKa7Uaa/view?usp=sharing Also I am using Samsung S23 FE with Android 14

pequots34 commented 3 weeks ago

@vtn-dev-manish, did you make any changes to the demo app?

vtn-dev-manish commented 3 weeks ago

Hi @pequots34 Just changed the package name and keys thats all. Also I would like to highlight that it happens randomly like 2nd time or 4th time we run the app after killing the app.

pequots34 commented 3 weeks ago

Thanks @vtn-dev-manish ! This will be addressed in 1.8.5.