Page 1 of 1

QR Codes

Posted: Wed May 19, 2021 12:48 pm
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)

Re: QR Codes

Posted: Wed May 19, 2021 1:40 pm
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

Re: QR Codes

Posted: Wed May 19, 2021 9:22 pm
by IdeasVacuum
Thanks Peter!