Page 1 of 1

QRCODE in LiveCode

Posted: Fri Jun 19, 2015 7:55 am
by mulandc@yahoo.fr
How to scan the QRCode with livecode?

Re: QRCODE in LiveCode

Posted: Fri Jun 19, 2015 9:59 am
by Dixie
If this is for an iOS mobile solution then... use Monte Goulding's MergAV or mergXzing external. (mergext.com)

Re: QRCODE in LiveCode

Posted: Fri Jun 19, 2015 10:06 am
by mulandc@yahoo.fr
thanks Dixie, I need for Android mobile.

Re: QRCODE in LiveCode

Posted: Fri Jun 19, 2015 11:24 am
by dave.kilroy
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

Re: QRCODE in LiveCode

Posted: Fri Jun 19, 2015 10:16 pm
by mulandc@yahoo.fr
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

Re: QRCODE in LiveCode

Posted: Fri Jun 19, 2015 10:24 pm
by dave.kilroy
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

Re: QRCODE in LiveCode

Posted: Sun May 01, 2016 3:22 am
by rca
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

Re: QRCODE in LiveCode

Posted: Sun May 01, 2016 4:12 pm
by Mikey
have you looked up the squirt livecode library? I'm using it to generate qr codes. It's all livecode, no externals, etc.

Re: QRCODE in LiveCode

Posted: Sun May 01, 2016 5:34 pm
by dave.kilroy
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)

Re: QRCODE in LiveCode

Posted: Sun May 01, 2016 6:07 pm
by rca
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