Hey guys,
I want to develop an app that is connected with the Firebase Realtime Database. I designed a demo like the figure. When I press the btn1, this app can read some information and upload it to the db. When I press the btn2, I want it can read from the db and show the location marker on the map. How can I reach this result?
you active atm happy to help you thu this easy when you understand
Something like:
Set ProjectBucket to users/user1
Get Taglist
Add returned Taglist to a list view/picker or spinner
Select "event" from picker
GetValue selected event
Select location values from returned json
Apply lat & lon to marker
these are some of the blocks you would need
there are soo meany ways of doing this you could also use
this is cool as as long as you have the a list of events it will get every one of them
Thank you TIMAI. Your suggestion about setting ProjectBucket to users/user1 really helps.
Thank you Van. I really appreciate your kind. Your answer really helps me.
Hey guys,
I just read a event list from my Firebase database. However, when I try to select the item from Listview, it doesn't work. What's wrong? You can find the structure of my database and if I want to show a maintext(eg. the number) and detailtext(eg. the result and the location info), what should I do?
I will work up an example for you...
Firebase component properties
Firebase data
Blocks
- The first event is used to populate Firebase with some data
- A button press returns the taglist to the listview
- When an item (event) is selected in the listview, a call is made to Firebase to return just the location data for that event, and this is then set to the marker on the map
Screen
You can, of course return all the data related to the event. This comes back as a json (dictionary) and would require some text manipulation to extract the coordinates.
Hi TIMAI,
Thanks a lot for all your help. If I want the ListView show the number as the MainText and other infomation(like HIV true/false) as the DetailText. Can I realize this functionality?
what you are seeing is the tags off from your firebase
you need to get the values of the tag
are you on at the moment lets work this out for you
then when you click on the list view tag looking back I don't no way I used a procedure block you can just move the "for each block" in to the taglist block below "global tag list"
I would also add a pan to lats long =P
so it would move the map to the tab you have clicked on
its 9am atm I be on here till about 1pm working on ma app soo feel free to message me
Hey Van,
Sure. I am online now.
have a play with the above (i added some screenshots)
then get back to me (none is tested just what I think might work
Hey Van,
I can handle the process that select the value from the firebase. My main problem is that how to show them in a Listview? Because I found that the Listview can show the Maintext and Detailtext, but I cannot find a feasible way to show them by blocks( most of the videos set these texts manually). So, if it cannot be realized, I may find another way to show them.
Just like this.
"\n" make a new line
value is from the got values block from firebase
Thank you!! I am blind
lol nooo there's just soo many ways to do things and to look at probsolving
I can show you like 5 ways to do the same thing
just things get over sited
injoy =P
when useing AI2 i like to keep thinking KISS
keep
it
simple
stupid