Qr : Read and Create Qr/Bar Code offline

The dimensions are the same as in the coding block, i.e. 800x800. What size does the decoder expect, because I can't see the information about it. I'll try on smaller sizes. Unless the more text the bigger the QR has to be?

Usually QR codes have a size of 150*150 or 200*200

Okay, experimenting with the size is successful.
The last problem with getting the logo from the asset path. I tried:

  • logo.png
  • /logo.png
  • //logo.png
  • ///logo.png
  • file: ///android_assets/logo.png

QrScan (1).aia (57.5 KB)

Yeah,found the issue.

ChangeLog Version 5

New blocks
image
Normally should not be used

Changes

  • Removed redundant barFormat param from DecodeBarCode method
  • Added barFormat param in BarCodeDecoded event

Bug Fixes

  • Fixed assets logo issue in GenerateBarCode method
    Thanks to @Patryk_F for reporting bug

Aix
Download Link: com.sunny.qr.aix (15.1 KB)

1 Like

Hi. Could you inform what level of error correction this extension uses? Maybe this value can also be added to the QR generation block?

Ok, According to the information found, I decoded the correction value. It is L.

The extension does not use hints while generating bar so it means L is the default value of error correction level.

Sure, I shall check.

I think this is necessary because it is impossible to decode QR with little text and logo. There is not enough recovery data to rebuild some of the code obscured by the logo.

a procedure that will automatically determine the size of the QR code depending on the data, so that the QR code always fills the entire image. This will work with "Numbers and Capital Letters" 0-9 and A-Z data. For other types, you need to change the CSV text.

It would be a good idea to automate this in the extension and only specify the size of one module in pixels.

Hi vknow360,
Thank you for the extension, it seems very nice.
I'm trying to add it to an app I'm doing but I'm not sure if it's possible.
Basically what I want to do is that the user has the possibility to be normal or VIP member. And to be VIP they have to enter a password in the app. Then, I want the app to generate a QR that, when scanned, tells if the user is member or VIP.
Do you think this is possible with this extension or with another extension you know?

yes, this sounds doable

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles
How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Surely it would be nice to implement for a QR Code extension but this extension is actually about Bar Code (although the name is just Qr).

You will have to generate an encrypted string, unique for each user, which when decoded after scanning returns VIP or Member text.

Barcodes include in stores, on products :slight_smile: . Android and the internet are full of QrCode, so this should be the domain of this extension ;).

But if it is doable with blocks then what is the need of adding it to extension.
Also I am still not able to understand what above blocks do.Can you elaborate a little more?

If you set a fixed size of the QR, as you wrote above, for example at 200x200, qr codes with a lot of text will have one module (one point) with the size of one pixel. In my experience, such a code made of small points is unscannable. I displayed the secret code on my computer, tried to scan with my phone and it was impossible. Experience shows that codes with a large amount of text should have one point with a size of 3px. Another case, we set the size to 200, with a large amount of text, for example, a code type 32 will be generated, which has a size of 145 points. So for one qr code point, there is only 1px and a 22px margin will be left. The blocks I showed allow you to automatically distort the size of the qr code to the number of points in the qr code, so that one point has, for example, 3px. Then the margin is always what we specify. For example, a code that has 160x160 points and a point size of 2px will have the size of 360px + a margin width, e.g. 2px, i.e. 364px.

Can this be fixed by adding error correction level?

It is possible that small QRs will be better to scan with a better correction. But as far as the full picture is concerned, that won't change.

ChangeLog Version 5.1

New Blocks
image
This property forces encoder to use the specified shape
Accepted Values: NONE,SQUARE,RECTANGLE

Changes

  • Auto scaling : bar codes will be now automatically scaled to match correct rotation according to height and width
  • Some internal changes

Extension is now open source

2 Likes

I think that since your extension doesn't work with barcode scanners because it contains the same libraries, there should be two versions of the extension. One with built-in Zxing library, the other without. Another solution is to add a barcode scanner to the extension.

That's right. Extension uses latest version of Zxing library.
The solution is to avoid using Barcode Scanner component and use Scan View extension (version that doesn't bundle library) instead.

4 Likes

In case we just want to make an image have a QR code and we have selected it with the FilePicker extension?