Hello everyone , I'm making an app for my school, it will be for a few classes (301 - 305).
Here on Brazil, we have to decide 2 or less people that is chosen to represent the class, They're referred as "Representantes".
There are 2 apps:
TheStudentTime: App where my classmates would use to see current news for the class.
TSTDEV: App where those "Representantes" would send the news for TheStudentTime.
I have the knowledge on a few languages such as python, and i know how easy it is to handle JSON in python, is there a way that i could implement that on MIT in any way? The apps are working and i just made a meeting with all those "Representantes" and they basically "ate me alive" with the things that couldve been changed or to change.
So I'm here asking for help, since with the better handling with the firebase information, it would make my life easier.
I'll be editing this post with the following codes that i use to handle the firebase files, but any help would be appreciated.
The screenshot shows how's the information is being handled.It basically shows in a ListView
Explain what you mean by "handle"? Do you mean how do you store and retrieve data? If you return a json from firebase how do you read it ? Something else ?
I do not see any data called "info1,info2,info...." in your firebase data ?
What are the startValue tags, where do they come from, and what do they return (set the returned value to a label to see) - oh, doesn't look all that complicated, but possibly over-complicated
Do you really need 4 firebase components, when one will do the job ?
Yes, I see from your blocks in 3 that you are using AppInventor
1- Yes, how i store and retrieve data. Ive noticed that in python is as easy as importing a library that will automatically get the text from it. For example, if i normally, without the blocks on MIT, it would retrieve for example -> "{(Math})", and that isnt very.. good for the user, thats why the blocks are there, to show "Math". (aka to be more clean)
2- The "Info1,info2,info..." are just to show that i want it to show as a pop up, where it shows a list of news for the past minute
3- Ah, the start values are simply to see which "Representante" joined, just so i can control who is sending what, so i dont get in trouble with my school if someone sends smth.... not cool
The startvalues are the Classes
There aren't enough days to explain everything, so in brief, using the firebase component and this simple dataset
If I set the project Bucket to empty and the tag to empty, then firebase will return the entire project contents as a json. ( I am not going to do this one....)
If I set the project bucket to empty, and the tag to dogFeeder, then firebase will return the entire contents of dogFeeder as a json
If I set the projectBucket to dogFeeder, and leave the tag empty, it returns the same as above
If I set the projectBucket to dogFeeder and the tag to columnChartData Firebase returns all the data under columnChartData as a json
If I set the projectBucket to dogFeeder and the tag to "columnChartData/ComidaGrande", firebase will return the value for ComidaGrande, e.g. "20"
Given that many of the returns from Firebase are as json, you can then choose how you wish to deal with the data on return. You can use the dictionary blocks or the list blocks. AI2 already sees the returned json as a dictionary:
but you need to convert the json to a list using a block from the web component
There you are a brief intro to "handling" data from firebase using the firebase component, dictionaries and lists.