Qr : Read and Create Bar Code offline

1.Introduction

Qr
Recently there were some topics about generating qr code offline and storing on device and thus I got idea to create Qr extension.
It basically creates and reads qr and bar codes offline from file.

Latest Version: 5.3
Released: 2020-03-20T18:30:00Z
Last Updated: 2024-06-10T18:30:00Z

2.Blocks

image

image

3.Documentation

A short documentation for the extension…

  • Bar Code Decoded
    Event raised after decoding bar code with result and bar format
    image
    result ~ text
    barFormat ~ text
  • Bar Code Generated
    Event raised after GenerateBarCode method with response and filepath.If any error occurred during encoding then filePath value will be empty.
    component_event (21)
    response ~ text
    filePath ~ text
  • Barcode Formats
    Returns a list of barcode formats which can be either encoded or decoded.Some formats can be encoded and decoded both like QR_CODE and CODE_39.
    component_method (36)
    **Returns : List< String >
  • Decode Bar Code
    Tries to decode barcode from given path.
    image
    filePath ~ text
  • Generate Bar Code
    Generates barcode to given path with provided hints.
    image
    text ~ text
    filePath ~ text
    logoPath ~ text
    height ~ int
    width ~ int
    fileFormat ~ text
    barFormat ~ text
    charset ~ text
    margin ~ int
    bgColor ~ int (Color)
    barColor ~ int (Color)

4.Downloads

5.Credits

A lot of thanks to Kodular for this awesome platform :heart_eyes:

6.Updates/Bug Fixes

ChangeLog Version2

Bug Fixes/Changes

  • Replaced relative filePath with abstract filePath in DecodeQrCode and DecodeBarCode methods.But both Generate methods still use relative filePath.
ChangeLog Version3

New methods

  • Added BarcodeFormats method

Changes

  • Removed some Qr related methods and events.Now you can generate qr using GenerateBarCode method by using QR_CODE as barFormat.
  • Now it will automatically ask for Read and Write permissions if they are not granted/disabled.
ChangeLog Version 4

Changes

  • Added logoPath parameter in GenerateBarCode method
  • Changed package name to com.sunny.qr from com.sunny.Qr
  • The extension does not ask for any permission and uses absolute file paths
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
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
ChangeLog Version 5.2
  • Internal changes in reader method to increase its efficiency by a huge. Now, you can provide it a non-pure barcode which may have other objects too, and it’ll correctly read from there.
  • BarCodeDecoded event’s parameters can be either a list or string now, based on number of barcodes found in the image. In short, it is possible to read multiple barcodes from an image.
ChangeLog Version 5.3
  • No external deps required
  • More accurate and faster results
  • Aix sized reduced to 378 Kb

Hope it helps! :slightly_smiling_face:

36 Likes

gooood

This is called creative works

3 Likes

Fine job. Thank you.

Do you know any litterature about the exact algorithm converting text to QR code and v.v? (not mean sites or programs which convert input text).
I know the pattern for one-dimensioned bar code (EAN-13). If you could suggest something about QR code it would help me.

2 Likes

Awesome work…can u provide test aia?

2 Likes

Read complete post aia is available

2 Likes

Ohh yes. I was confused due to the download titles. In both titles there is…Aix

1 Like

After generating apk file with your aia and tried in Redmi note 5 pro, The app is crashes immediately…

1 Like

Hi @The_K_Studio
It has been fixed and you can test it now.

1 Like

Your welcome.

Do you mean manual conversion?

I mean the mathematical pattern of how the position of little squares in the image are transformed to text and vv.
Like in EAN-13 bar code, the set of numbers are evaluated are trace vertical bars of a certain width, separated by blanks of a specified width.

1 Like

Sorry…I have not so much deep knowledge :worried:
But this can be useful:

3 Likes

I was aware of it. It seems that algorithm of QR is much complicated than EAN-13. I didn’t manage to find any information more.
Anyway, thanks for your interest.

1 Like

I have granted permission…but

1 Like

It is working for me…

Which android version are you using?

Android 9, Redmi Note 5 Pro

1 Like

Can you try it on another device?

Same problem. Tried in Android 8

1 Like

Something is not right with the permission as I get the same error however, adding ask for permission block make it works

bild

2 Likes

Does anyone know how to use the external QR method? since the phone camera is not fast enough as the external reader.

1 Like

Thank you @Boban
I will try to fix it as soon as possible :heart_eyes:

2 Likes