QR Scanner

The camera shows up now, but it is mirrored.  This is probably because it is a front-facing camera.  When I scan a code, it returns with the wrong code, I think because the image is mirrored.  see below.

oKbTq6o.png?1

Please try to scan this code and see if it reads correctly. I’ve mirrored it myself.
Error in scanning can be due to poor light and camera quality as well.
 

That one works perfectly.

There is a problem. I do have a piece of code that compensates for mirroring front facing cameras, and if your device still shows up mirrored, it could be the problem of the device firmware. Early Android 4 builds have quite a few camera related bugs.
If I touch this piece of code, other Android devices might turn mirrored.

If I had your device on hands, I could tell for sure.

Can you install fresh custom rom on this device and see if it is still mirrored?

I can appreciate the situation re: old Android versions.  This tablet model isn’t worth the trouble.  I will eventually apply a custom rom and make it work better, but right now I am using it to test and don’t want to risk messing it up until I’m done testing.

likely a stupid question, but I am getting the error “plugin.scanner library is not available on this platform” with the sample project.

nvm… Now for maybe a less stupid question… How can you replace the overlay?

It’s “plugin.qrscanner”, not “plugin.scanner”.

You can’t. At some point later I will make it more customizable, no time for it right now.

Understand. As an option it would be great if there was an alternative overlay that could be selected via a parameter that has a dotted rectangle (landscape) instead of a square to facilitate rectangular barcodes like vin barcodes on a car etc.Thanks for your contribution, this actually saves me form having to subscribe to the enterprise edition!

When trying to build the APK I get the following error:

qr.jpg

You didn’t get the plugin from Corona Store to your account. https://store.coronalabs.com/plugin/qr-scanner

@Lerg

Its occurring an error.

I’ve already get the plugin at the store and checked the code.

Check it: 

Captura_de_Tela_2015_10_08_s_14_11_02.pn

@Lerg

Its occurring an error.

I’ve already get the plugin at the store and checked the code.

Check it: 

Captura_de_Tela_2015_10_08_s_14_11_02.pn

Hello, I’m rather new to Corona, would you be able to clarify what is returned by the plugin (If the QR code is a website link, is that what’s returned, and if the QR code is a string, would a string be returned)?

Thanks.

rodrigopalmei, you have “plugin_qrscanner”? With underscore? It must be with a dot “plugin.qrscanner”

@Lerg

No, check the code. Its exactly like the example.

Captura_de_Tela_2015_10_09_s_09_26_08.pn

Captura_de_Tela_2015_10_09_s_09_26_25.pn

Basically a QR code holds a string of data. That string could be a URL (website link), a number or any text you wanted the QR code to represent.

I believe the plugin returns that string to you, what you do with it is up to you.

Rob

That’s right.

rodrigopalmei, you are using a very old Corona version, use at least version 2646, or the latest. I don’t think there are any reasons not to update.