Understanding QR Codes
Here is an example of what a QR code looks like:
For you to make effective use of QR codes for this course, you will need to understand the difference between
How QR Codes Work
What looks to you like a bunch of spilled ink is actually a web address that a computer can read easily. After you scan the code, your device goes to the location mentioned in the QR code and downloads whatever file is indicated. After this download happens, you typically have to find the downloaded file on your Android device and install it to install the app permanently on your device. These are the steps to follow for a permanent installation once the app you are building is completed.
But during the development process while we are still busy changing, debugging, fixing and otherwise updating the app constantly, this same QR code technology can help greatly speed up the process by which we load code from an App Inventor 2 project into our Android device quickly. We do this by first installing an app called AI2 Companion on our Android device. We then run the Companion app and select the QR code option.
Back at the PC, we select "Connect --> AI Companion" from the drop down menu at the top of the screen which generates a QR code. Once we scan the QR code with our device, the code for our app automatically gets loaded and the app starts up.
The single biggest advantage to this approach is that further changes to the AI2 code automatically get reflected on our device without the need for constant downloading. If the device and the PC ever fall out of synch, we can select "Connect --> Reset Connection" to restart the process.
Temporary vs. Permanent QR Codes
QR codes generated by the AI2 software on the PC are only temporary - they are only displayed and useful for a few seconds. Another option is to select "Build --> App" from the top of the screen. This also creates a QR code. This QR code is only good for a few hours, however, and so is also temporary.
If we are to create a QR code that lasts forever (which we need to do to share our app with others), we must turn to some third-party QR provider. There are many such free providers on the web.
One example is: http://qrcode.kaywa.com/
Static vs. Dynamic QR Codes
Websites like Kaywa can generate both static and dynamic QR codes. The advantages of a dynamic code are primarily that once established, you, the developer, can update your software and still use the same code. There are some other advantages to dynamic QR codes also. However, there is one major disadvantage - they cost money.
For the purposes of this course, you only need to create static QR codes. These are free and last forever. So during the QR building process on the Kaywa website, be sure to select the static option when creating your QR code.
How to Scan a QR Code on your Android Device
After selecting the QR option on your Android device, simply hold up the device so that the QR code appears fully on the main screen. Getting too close or too far will not allow the QR to load. You will know when you have done it correctly because an audible beep will sound. Afterwards, press the file name that appears on your screen. It is important to note that after this file automatically downloads to your device, your app is not yet installed. You must swipe down on the main screen on your Android device to reveal all the recently downloaded files. You must then select the recently downloaded file for your app and follow through with the installation instructions on the screen.
Afterwards, your app is fully installed and ready to go!
How to add QR Codes to your Course Website
When adding QR codes to your course website to submit assignments to your instructor, please be sure to paste a small version of the image centered on the page.