Barcode Scanner With APP INVENTOR
by bloomlj in Circuits > Mobile
32630 Views, 15 Favorites, 0 Comments
Barcode Scanner With APP INVENTOR
In many application case,we should use a app to scanner a barcode(always QRCODE),and do something (open a hardware,or a restful api request),so first thing we need do is to develop a app to scan the code.
MIT APP INVENTOR is a very easy to learn and use app develop tool.The website of the APP INVENTOR is :
Prepare the Tools
Fist thing is setup the debug environment.
The totural is at
http://appinventor.mit.edu/explore/get-started ,
http://appinventor.mit.edu/explore/ai2/setup.html
The recommend method is : Build apps with an Android device and WiFi Connection (preferred)
Just scan the code at http://appinventor.mit.edu/explore/ai2/setup-devi... install
MIT AI2 Companion App on your phone.If u are at china,u should install scan the second code,and pls don't use we chat,or download the apk driectly.
when installed secussful,you can lunch the app,and start the app devemopment.
Add Components on Screen
click the yellow "Create APP" Button at http://appinventor.mit.edu/explore/index-2.html# ,and reg or login.
when login ,first create a new project.
then put some components from left menu to sreen edit panel,like piectures in this step.
Edit the Logic
In APP INVENTOR , App logic is programmed by language like scrach or blockly.
click the right "blocks" button to edit the logic.
drag the left logic to blocks edit panel,like pictures in this step.
Debug
In top menu,click the Connect/AI Companion.then get a code and generate a qrcode.no pick up your phone,open the MIT AI2 Companion APP.
Input the code or scan the qrcode to auto generate the code.
Click :"connect with code",then you get the app we add at last step.
Install the ZXing App
Now,we can edit the app,and debug it.
you may found the scanner compontent don't work!
That is because the scanner compontent in the APP INVENTOR need install a scanner app first.
I recommend ZXing barcode scanner,you can install by your app store,it is a free software.
Enjoy your APP INVENTOR!
you can extend this example,and do something,like open a IOT device when got the bar code scanning result.