Android Question How can I select encryption level in "QRGenerator.bas (V1.60)"

I.Härter

New Member
Hello everyone,

I dont know, if I'm only blind or dumb or if my problem is a real bug.
I'm in my really first B4A project, so I must ask a question, someone else would say: It's so simple!
I'm sorry.

I have a problem with QRGenerator.bas (V1.60).
How I can select a specific encryption level (L,M,Q or H)?

With every try I only get a "Level L" in different byte-length.
The same works in the example projects: Everytime only Level L.

I've made some tries to find the problem and a solution:
- found nothing in forum
- found nothing in source code, but
- manually resort the source code made me able to get one(!) other encryption level
- analysed the sub "Create" and think there are 2 problems:

1. No parameter for select the encryption level
2. The first search-loop in this sub everytime automatically equals first with a Level L encryption (based on predefined sort).

I've tried to rewrite these 2 steps with my simple knowledge and really: Now I get a 40H ...
... evertime! shit! That's not, what I want. So I must revert back to the original code.

How is the solution for select a specific encryption level?
 

I.Härter

New Member
Hi Erel,

thank you for fast reply.
Please excuse my mis-translation.
I know there is no encryption.

What I mean:
How can I manually select a specific error correction level?

PS: Can I edit the Headline and my post after replies?
 
Upvote 0

I.Härter

New Member
I know this code and i see, that this code never gets another ecc than Level L.
"the first version that can handle the input text size" is everytime only Level L.
Examples work too only with Level L.
So it seems Level M,Q and H are never used.
problem is the predefined sorting order in
B4X:
Public Sub Initialize (BitmapSize As Int)

I've tried to do some changes (see my first post), but nothing works.
I can force some single solution by resort the definitions, but thats not the correct solution.
Otherwise I tried to expand the Sub Create to
B4X:
Public Sub Create(Text As String, Level As Char) As B4XBitmap
and implement a handling code, but I'm not a Professional and it didn't work.

For Logo-Overlay the ecc must be selectable.
As I know from other codings/languages select or define a needed ecc level is the normal handling, but here i can do nothing.
 
Upvote 0
Top