Issue with Barcode Scanning on Android in Snap: Value Resets Before Updating Textbox

Solved

Hi everyone,

I'm working on an application using Snap that involves scanning QR codes. The goal is to check if a scanned QR code matches a predefined value and then use that value to update a global variable via a textbox. This approach is working well on iOS, but I'm encountering an issue on Android where the scanned value seems to reset before it can be applied to the textbox.

Does anyone have suggestions on how to address this problem? I suspect it might be related to how barcode scanning and data handling differ between iOS and Android. Here are the steps I've taken so far:

  1. Checked the settings of the barcode widget, especially on Android, to ensure they are configured correctly.
  2. Experimented with introducing a small delay (e.g., a few hundred milliseconds) after scanning the barcode before setting the textbox value.
  3. Used debugging techniques to track the value of the scanned barcode at different stages of the application's workflow.
  4. Reviewed event handling to ensure that barcode scanning events are properly sequenced and handled.

I would appreciate any insights or suggestions from those who have experience with barcode scanning and app development on Android. Thank you!

a year ago
SOTI Snap
ANSWERS
DK
Deepak Kumar
a year ago

Hello Tommi,

Would it be feasible for you to provide us with an app token that we can import, creating a copy of the app, so we can analyze the issue and offer potential solutions?

TL
Tommi Lundsten
a year ago

Hi.

Sure here is the token.


9b62cdfb-7d4c-3056-f0b4-0fe03f82a373

DK
Deepak Kumar
a year ago

Hi Tommi, It appears that the app token requires a password for access. Could you please share the password with me via email at deepak.kumar2@soti.net?

TL
Tommi Lundsten
a year ago

Hi Deepak.

Did you get the password?

DK
Deepak Kumar
a year ago

Hello Tommi,

Could we hop on a call to talk about your concern? We haven't pinpointed the issue yet, and we'd like to delve into the specifics of your use case. There might be a swift solution we can address during the call.

Solution
V
VPMod@SOTI.net
a year ago

Hi Tommi


Thanks for posting on SOTI Pulse.

Thank you, Deepak, for responding to the post, your expertise and willingness to help are greatly appreciated.

We are glad to know that your issue has been resolved. If you have any additional questions or concerns, please don't hesitate to reach out. We're dedicated to providing assistance and support.

Technical Support, SOTI Inc.

DK
Deepak Kumar
a year ago

Hello Tommi,

It appears that the problem stemmed from how the JavaScript code was crafted. I'm pleased to note that the JavaScript code supplied by our team has proven beneficial for your application.

Similar Discussions