Apply your knowledge to build something amazing!
Please watch this video to see how this app works.
The sample UI of the app and components that you will be using to make the app:
Sample UI | Components |
---|---|
![]() |
Layout: Vertical Arrangement Visible Components: Label Button Non-visible Components: Barcode Scanner Activity Starter Notifier |
In this app, you will need to program 2 different buttons. Program what happens when the users interact with each button.
BEFORE you code this app, please check whether or not you have set the properties in correctly. You will need to change the default settings of some components respectively in order to run this app smoothly.
Component | Property Setting | Reason |
---|---|---|
![]() |
Untick "Enabled" ![]() |
To make sure the Show Result Again button is not clickable before the users scan any barcode. |
![]() |
Untick "Use external scanner" ![]() |
To use MIT App Inventor default build-in scanner instead of installing another external scanner on your phone to activate the barcode scanner. |
![]() |
Write android.intent.action.VIEW under "Action" box ![]() |
To enable users to open a browser to a specific web page. You will need to specify what is the DataUri in ![]() |
When users click on the Scan button, the BarcodeScanner will start to scan the barcode or QR Code. [Hint: Only 2 blocks.]
After you scan the barcode or QR code:
Enable the Show Result Again button.
Check:
If the user chooses "Go to website", program ActivityStarter to open the link. [Hint: 8 blocks in total.]
When users click on the Show Result Again button, they can view the previous result again.
[Hint: The exact same codes as in step 3(b). You may use a procedure to make your codes shorter and more efficient.]