QR Codes

Just starting out? Need help? Post your questions and find answers here.
IdeasVacuum
Posts: 143
Joined: Tue Feb 25, 2014 1:27 pm

QR Codes

Post by IdeasVacuum »

Can we:

Read, write, display and store QR codes with a Spider Basic Web App?
Can that Web App reside on both Android and IOS devices and be run by the device browser? (i.e. not as mobile apps)
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: QR Codes

Post by Peter »

Hi IdeasVacuum ,

here's a simple code to generate QR-Codes:

Code: Select all

EnableExplicit

Procedure Main()
  
  Protected GID
  
  OpenWindow(0, 0, 0, 220, 220, "CanvasGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  
  CanvasGadget(0, 10, 10, 200, 200)
  
  GID = GadgetID(0)
  
  ! var qr = new QRious({
  !   element: v_gid.gadget,
  !   size: 200,
  !   value: 'https://www.spiderbasic.com/'
  ! });  
  
EndProcedure

! require(["https://cdnjs.cloudflare.com/ajax/libs/qrious/4.0.2/qrious.min.js"], function(Q) {
!   window.QRious = Q;
Main()
! });
Dokumentation: https://github.com/neocotic/qrious

Reading QR codes is not particularly complicated either, but it is time-consuming (controlling the camera, reading in the image, etc.). But it can definitely be done with a browser.

Greetings ... Peter
IdeasVacuum
Posts: 143
Joined: Tue Feb 25, 2014 1:27 pm

Re: QR Codes

Post by IdeasVacuum »

Thanks Peter!
Post Reply