QRCODE in LiveCode

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
mulandc@yahoo.fr
Posts: 13
Joined: Wed Feb 25, 2015 2:15 pm

QRCODE in LiveCode

Post by mulandc@yahoo.fr » Fri Jun 19, 2015 7:55 am

How to scan the QRCode with livecode?

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: QRCODE in LiveCode

Post by Dixie » Fri Jun 19, 2015 9:59 am

If this is for an iOS mobile solution then... use Monte Goulding's MergAV or mergXzing external. (mergext.com)

mulandc@yahoo.fr
Posts: 13
Joined: Wed Feb 25, 2015 2:15 pm

Re: QRCODE in LiveCode

Post by mulandc@yahoo.fr » Fri Jun 19, 2015 10:06 am

thanks Dixie, I need for Android mobile.

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: QRCODE in LiveCode

Post by dave.kilroy » Fri Jun 19, 2015 11:24 am

Hi muland - I was doing a remote session with some people a couple of weeks ago and off-the-cuff we managed to get QR code creation and reading working on desktop by using the API on this website http://goqr.me/api/doc/create-qr-code/#param_data

I found it surprisingly quick and easy to use and I'm imagining that it would work on Android too ... BTW I have no relationship to goqr.me - it was the first viable looking result I got from a Google search and I should think there are lots of other services you could use instead

Let us know how you get on

Good luck!

Dave
"...this is not the code you are looking for..."

mulandc@yahoo.fr
Posts: 13
Joined: Wed Feb 25, 2015 2:15 pm

Re: QRCODE in LiveCode

Post by mulandc@yahoo.fr » Fri Jun 19, 2015 10:16 pm

hello, I know how to generate the QRCode and it work perfectly after the session we did with you on skype(I hope you remimber: Christian, Daniel and Razvan) but the problem we still have is to creat our own reader app/external to scan the QRCode. perhpars if you have time we could have a session on skype next week. Hope to hear from you on skype as soon as.
thanks.
Christian

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: QRCODE in LiveCode

Post by dave.kilroy » Fri Jun 19, 2015 10:24 pm

hello Christian! Of course I remember you three - and it was the session with the three of you I was referring to. I thought we managed use that website to do the full circle of creating a qr code, downloading and saving the image locally and then uploading it to the server again to read it... but it sounds like we didn't quite finish off the process?

I'll send you a Skype message now to set up our next session...

Dave
"...this is not the code you are looking for..."

rca
Posts: 16
Joined: Wed Aug 03, 2011 8:22 pm

Re: QRCODE in LiveCode

Post by rca » Sun May 01, 2016 3:22 am

OK
Great
so

Code: Select all

on mouseUp
   put "http://api.qrserver.com/v1/create-qr-code/?data=HelloWorld!&size=100x100format=gif" into theUrl
   set the filename of image "image1" to theUrl
end mouseUp
works perfectly on a mac desktop, but not on iOS

For iOS, I have tried every combination that I can think of, including (these are separate choices, not all in line...
set the text of image "QRImage" to URL theUrl
set the imageData of image "QRImage" to URL theUrl
set the filename of image "QRImage" to URL theUrl

Code: Select all

   put "qrcode.png" into thePicture
   put specialFolderPath("documents") &"/Photos/" & thePicture into thePhotoPath
   answer thePhotoPath
   
   libURLDownloadToFile theUrl,thePhotoPath,"downloadComplete"
put URL theUrl into URL ("binfile:" & thePhotoPath)

any ideas - seems like you said that you had it working on iOS?

btw, I tried this site too
http://api.qrserver.com/v1/create-qr-co ... Info&ecc=M

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: QRCODE in LiveCode

Post by Mikey » Sun May 01, 2016 4:12 pm

have you looked up the squirt livecode library? I'm using it to generate qr codes. It's all livecode, no externals, etc.

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: QRCODE in LiveCode

Post by dave.kilroy » Sun May 01, 2016 5:34 pm

Yep there is Squirt which Christian, Daniel and Razvan (see above) got working in Android.

If you don't want to use Squirt you you might try saving the downloaded image to the device before using it - make use of 'specialFolderPath(), and then you can do:

Code: Select all

set the filename of img "imgQrCode" to tPathToFile
I often use 'libURLDownloadToFile' which works nicely on mobile (even if the rest of libURL doesn't yet work on mobile)
"...this is not the code you are looking for..."

rca
Posts: 16
Joined: Wed Aug 03, 2011 8:22 pm

Re: QRCODE in LiveCode

Post by rca » Sun May 01, 2016 6:07 pm

Hi Mikey

THANKS for the quick response (QR!)
Squirt works perfectly for what I need - on Mac, and on iOS. It also is a great complement to mergZXing - so we are using it for sharing data between iOS devices - create the QRCode on one device, and read it on the other. I plan to use it with server as well
Also, I already own it - just had not used it for a few years.

We will be using it in an app that is available in the App Store - we already read standard RFID badges with some custom hardware, and help from Monte's BLE external.
Adding barcode was easy, and extends what we can do for attendee tracking and verification.

thanks
r

Post Reply