How to create a QR code generator app in MIT App Inventor 2

 YouTube Video Tutorial


Hello everyone!! Today we will see how to create a QR code generator app. QR codes are really amazing and they can store many wonderful things which is not easy to interpret manually. We find QR codes and bar codes almost everywhere in our day to day life. We can find barcodes on products that we buy from stores. We find QR code in many places where we have to make payment with different UPI apps. So QR codes and barcodes are very useful and you can use them to create wonderful projects. Similarly, today we will learn how to create an app which can convert any text into a QR code and when you scan that QR code you will get the same text that we had entered before. So creating this app is quite easy and it will take only 3 - 5 minutes for you to create this app.

Resources

Components used:
  • Text Box to enter text
  • Button to generate QR code
  • Image to display QR code
  • QR code generator extension to help in generating QR code
  • Notifier to show warning messages
Source Code:

The code we have done for this app is pretty simple. If the user clicks on the button to generate QR code then we have to check if the text box is empty or not. If the text box is empty we have to show an error message or else we have to call the extension and generate a QR code. Here in my case I have set the size in the extension to image1.width but you can change it.


Once the QR code has been created successfully we will call the extension and set the image 1 picture to the QR code image which is generated by the extension so that the user can see the QR code. 

Here is the full code



Download files


To know more about this you can visit my YouTube channel where I regularly upload videos related to programming and mobile app development using MIT App Inventor. If you have any doubts regarding my tutorials then you can always feel free to ask me in the comments section below.

 




Coding Hats

Jinay Sarawagi, Tech enthusiast, innovator and explorer in field of Robotics and IoT Technologies.

2 Comments

Post a Comment
Previous Post Next Post