Android Question Help needed to generate Qr Code in B4A using B4J example

MarianoDuk

Member
Licensed User
Hello to all, please apologize my english...

I know maybe this is a silly question, but i am not using B4A too much, so i have some doubts...

I want to generate a simple Qr Code in my Android phone, and i founded 2 ways of do it, one way is using Google Api... and the other way is the "Qr Generator" class, included in this post (https://www.b4x.com/android/forum/threads/b4x-qrgenerator-cross-platform-qr-code-generator.93092/), that has a B4J sample.

- Wich are pros and cons of this 2 methods?

- Both methods needs an internet connection to work?

- Can somebody please teach me how to use this QrGeneratos class, to test it in B4A? There is a B4A example? (i dont know B4J)

Thanks in advance!!!
 

DonManfred

Expert
Licensed User
Longtime User
Wich are pros and cons of this 2 methods?
one uses an online api, one not.
I would prefer the OnDevice-Solution. Means; i would use the B4X Class.
There is a B4A example?
You can use the same code in b4a.

B4X:
    Dim qr As QRGenerator
    qr.Initialize(ImageView1.Width)
    ImageView1.Bitmap = qr.Create("QR with B4X!!!")
    Dim sb As StringBuilder
    sb.Initialize
    For i = 1 To 20
        sb.Append("QR with B4X!!!")
    Next
    qr.Initialize(ImageView2.Width)
    ImageView2.Bitmap = qr.Create(sb.ToString)
 

Attachments

  • QRCodeB4A.zip
    12.3 KB · Views: 503
Upvote 0

MarianoDuk

Member
Licensed User
Thank you DonManfred!
Ok, i will use that on-device solution, instead the online one.
I currently use B4A 6.50, so when i opened the example it say i need a newer version, and dont recognizeb4xbitmap, b4xcanvas, etc.
Wich B4A version do i need? The Newer versions of B4A will run the 6.50 apps that i made without problems? (they are all simple apps)
Thanks again.
 
Upvote 0
Top