top of page
Writer's pictureCoding Hats

Create a QR Code generator app using MIT App Inventor 2

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:


YouTube Video Tutorial:




Download files:








116 views0 comments

Comments


bottom of page