Monday, May 19, 2014

working with qrcode.js for generating qr code - powerful chrome app by varun raj

Learning programming language doesn't matters at all.Because applying it real world for the end users comfort matters here.The same way last week i was learning with QR code to generate from javascript code and i was wondering where to use it and how users could easily the same time +Varun Raj was working with QR code generator javascript and successfully create the application which helps sync between desktop to mobile phones with this QR code generator.

QR code it javascript.


Installation of qrcode.js:

just like other javascript include just include the script in to the web page or ur preferred projects.

<!--- include this in your header -->
<script src="qrcode.js">

Generate the QR code :

so what do we need for QR code is URL alone.this QR code.js gives to create new object for developers to just pass the url to the process the function.

new QRCode(document.getElementById("YOUR_DESIRED_ID_TO GENERATE_QR")
   , "");

thus running this script will generate the QR code instant manner for your webpage in the given ID.

so,now how could we make user friendly for other users.and comes here is Chrome App. +Varun Raj had just created the simple extension for chrome browser and which could work with Chrome API to interact with browser Title and URL.then it is processed using popup.html of the app and generate the QR code for the users to capture it and use it later in their smartphones.

Chrome App Structure:

 APP Extension
 |---------- manifest.json //initalize app with permissions,icons and other API mentions
 |---------- popup.js //handles the extension events,clicks and responds in chrome
 |---------- Jquery.min.js //here just to append the title text in extension
 |----------  popup.html //our extension html markup where we generate QR code
 |----------  qrcode.js //Javascript main file to generate the QR acts like library.
 |----------  icon.png //our extension icon

Live Demo for non Chrome Users:

new QRCode(document.getElementById("qrcode")
   , "");
See the Pen working with QR code.js ~ i-visionblog by s.shivasurya (@shivasurya) on CodePen.


Snapshot on the chrome app.

about developer:

Developer : +Varun Raj ,
facebook  | Google | Twitter 

Thus we had seen the qrcode.js make our life easier without typing long urls and makes easy transfer for for bug and share is care.


Unknown said...

Thanks for sharing man !

shivasurya said...

:) it was really useful for users! keep developing bro !

Post a Comment

feel free to post your comments! Don't Spam here!