QR Scanner

runewinse, can you please double check? I can’t find in my code where an empty string is possible.

Lerg, I just built a new apk and put on my device and when I try now I get ‘unknown’ for those “false positives”.

runewinse, I’ve just pushed another change. After update you should see a string like “unknown (123)”. I am interested in the number inside the parenthesis. Please try several times and tell me what numbers you would see.

Hi,

I always seem to get “unknown (2)”.

https://youtu.be/UhqEg5ncmu8

runewinse, that was helpful, found an issue in the underlying lib. Now you should stop getting false scans.

Dear Lerg,

I have purchased your QR plugging today. It is fantastic. Precise and fast. Thanks for this great job.

But, one question:

When I scan for a QR generated with some text, the result for some letters are strange. For example, for the ó I obtain a chines character.

I think this is the text of the font.

Really I want to use this plugging to pass little amount of data from one device to other without using network or bt. simple scaring over the other device screen. Works but, as mentioned, some symbols are changed.

Is there any way for normalize the text ?

Perhaps need to use json with the message ?

I don’t want to loose any data. Also note that my app is translate and use many languages, including chinese.

¿can you guide me?

Thanks again,.

See the attached photo for the example.

Please, see this attachment for the correct text. I have used another free qr reader app to scan the very same qr code, and the result is correct. The change is over the diacritical symbol over the ‘ó’. (accent).

Dear, I’m testing. If I include some chinese characters in the original QR, works fine.

CesarHernandez, thanks for the feedback!
This is an UTF-8 problem.
I believe you are getting the correct data, but it’s not recognized as UTF-8 by default.
By default I think QR assumes SJIS encoding, so you can either convert the receiving data from SJIS to UTF-8 or you can include UTF BOM marker at the start of the encoded message.

CesarHernandez, actually, have you tried on iOS? Is it the same behaviour?

Dear Lerg, i will try on ios and confirm. I alsi think it is in relation with utf8 encode.thanks for your quick answer and excellent support.

Great! I’ve now done a quick test and so far no false scans!

Thanks!  :slight_smile:

Is there any chance that the QR Scanner can break UTF-8 encoded contents? I don’t think so, but I struggle to transfer an UTF-8 encoded string from one device to another.

https://forums.coronalabs.com/topic/68831-transfer-a-string-from-one-device-to-another-via-qr-scannergenerator-utf-8/#entry357080

runewinse, by default QR technology uses SJIS encoding, not UTF-8. Other apps must be doing something extra to make it always utf-8, can you check if on iOS it’s working the same or differently?

Lerg, I’ve now done a bit of testing and here’s what I’ve found:

Show on iOS device, read on Android device - FAIL

Show on Android device, read on iOS device - OK

Show on Android device, read on Android device - FAIL

Show on Corona simulator Windows, read on Android device - FAIL

Show on Corona simulator Windows, read on iOS device - OK

Show on Corona simulator iOS, read on iOS device - OK

Show on Corona simulator iOS, read on Android device - FAIL

So it seems the scanning + UTF-8 fails for Android devices no matter the source and

that the scanning  + UTF-8 works for all iOS devices no matter the source.

Does this make any sense?

runewinse, thank you! That means I have to modify the Android version only.

Lerg, ok, so does that mean that there could actually be the QR Scanner that is the culprit? In that case it’s quite a relief, because I had no idea what to do about this 

runewinse, yes. If iOS and Android version of QR plugin have different behaviour - that’s a bug. Will fix.

Hehe, yeah, unless it’s the user of the plugin (me) that has messed up something…

Anyway, great that you’ll look into this  :slight_smile:

Need Help. I use sample project.

  1. press “Scan QR”

  2. pick the QR code, getting green overlay

  3. scanner slides right back to main buttons screen without any message

but the listener should call native.showAlert function and show me the result!

What’s wrong here?

iOS 10.3.1, iPhone 6, corona 2017.3067