So then if I just wanted the text item to add directly to the list, what would I use instead of the label text?
sorry but I don't understand what's your question.
You want to scan a qrcode and store the result to an list? or retrieve a item from list and generate a qrcode?
Yes, I want to scan a qr code and then whatever text data that is on the qr code goes into a list I made
then in afterscan event, add the result to your list. Open the List drawer, you will find the blocks you need.
Would this type of code work for getting the qr codes result (aka the text) and adding it as an item to the list?
Iooks good. You can try by yourself.
Two blocks same result.
Neither of my options worked, and I tried tweaking the code in little bits but to no avail. I can’t seem to just simply add a text item to a list from a qr code.
When I tried the method previously shown with the label, it did work and give the data result in text, but not when it’s an item being added to a list.
And I know that it’s nothing to do with the text colour or anything trivial like that, so I’m confused.
you mean you can show the result on a label, but can not add it to the list? how did you do that? show your blocks
Well the blocks below were TIMAI2’s design, and they got the result and then that result showed on the label, but the design flaw was that I would only be able to have 1 piece of text on the label at a time, and if I wanted to scan a different qr code it would erase the 1st text
So I tried both “get result from barcode scanner” and get result blocks on my code which I showed above, so I don’t get why it won’t get the result and just add the text item to the list.
Is it to do with the way my list and add/remove/clear all buttons are programmed?
you did not follow my suggestion.
try block like this:
In the blocks, would I need to have a label 1 block there?
label is just for debug, it will show you if the result is saved or not.
You can choose a label or listview to show the list data.
So then what would I replace the label block with if I just wanted to see the results on my list view I have on my screen?
set ListView1.Elements to Bus_list might work.
While you are wondering, you might learn some basics about App Inventor coding. Especially Programming Lists of Data
Here are some resources to help you learn to use the AI2 tools. A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .
Also look here App inventor español. Offline. Tutorial. Ejemplos. Instalación. Códigos. Juegos. Curso gratis de App inventor. and here Tutorial Index | Imagnity for more tutorials
Learn about components Component Reference
and visit the Library The MIT App Inventor Library: Documentation & Support Help>Library on the MENU
For my version of the app, the blocks would do the scanning and stuff, but the data then wouldn’t show up on the screen unless I use a label, which I don’t want to use because I want the item to be added to the list instead of on a separate label.
But, when I hit my “add bus button” on my screen, it adds what text was supposed to be there like this image below
Why so difficult ?
Hello, I'm trying to create a QR like yours and it's telling me that this API has been discontinued. Am I doing something wrong?
It still works
It seems that Google Chart QR code API, which has been deprecated before, indeed doesn't work anymore and is returning 404 Not Found
. As an alternative, I found QuickChart and use it in my projects now:
https://quickchart.io/qr-code-api/
Your example would translate to:
https://quickchart.io/qr?size=200&text=yourdatahere