Hi all, sorry for my english but i am using a translator.
I'm trying to figure out how to build an app to read data from a web page (then in the future I hope to be able to process it).
If I can, I can attach the block diagram that I copied/modified from a tutorial that was used for other things.
I have a web page that when called returns a response like: [699,0,-942,0,0]
what I would like to do is be able to separate the numbers...
With the Split-text function and setting the "," I managed to separate something but I can't separate all the numbers...
Am I doing everything wrong?
Is there another tool for what I want to do?
What I would need is both to display the numbers in windows, but also to simply process them, like if the last number is 0 do this otherwise that...
Can you give me a tip, just direct me so that I understand what I have to use to understand.
first remove the brackets, then use the split at block to split at , (comma) to get a list of your numbers, then just use the select list item block to select the 1st, 2nd etc. number
I'd like to write to you that I understand.... but....
I don't understand which tools I have to take, what are they called exactly?
ps : treat me like a child, write me step by step what to do .... I have the good will to learn but unfortunately I'm not very familiar with these objects ....
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...? .
I don't think it's necessary or helpful to use an additional component for such a simple matter that also declares (possibly unnecessary) permissions in the Manifest.
If aimed at my solution, the OP is already using a web component to get their web response, so logic follows to use the same component to decode the response. Most people would see that the string is a json array.
wow! what a great team you are!! congratulations and thanks again!!!
After Peter's help I was able to divide the numbers as I hoped, and I was also able to assign each value to a variable.
Now I'm trying to figure out how to make the "label" change color if the value exceeds a certain threshold... but I haven't succeeded yet.... But for now I'm not asking for help I still want to try and try again .
Do you know if there is a manual that explains a bit of everything about App Inventor, I mean a downloadable pdf from the internet?
Thanks again for the valuable advice!
ps : I will also try the other solutions after Peter's to see what result they lead to!