Import data from Firebase to Listpicker or ListView

153 views
Skip to first unread message

Junior Campos Authentik

unread,
Oct 10, 2018, 9:48:43 AM10/10/18
to MIT App Inventor Forum
Hello Everyone,

I am developing a app where i created a database in firebase (customers).
I´m not getting import this data for listpicker in my app. i Would like to import all customers included in database pressing button.
Can someone help me please!

(sorry for english, I'm brazilian)

thanks for all

SteveJG

unread,
Oct 10, 2018, 10:47:20 AM10/10/18
to MIT App Inventor Forum
You can not use the ListPicker to automatically access the FirebaseDB values.  Convert your Firebase tags to a List, then use use the ListPicker to pick an item from that List.

You did not show how you are using Firebase (you did not post a Block image here in the Forum) so it is impossible to recommend exactly how to do that.

Regards,
Steve

Junior Campos Authentik

unread,
Oct 10, 2018, 11:04:34 AM10/10/18
to MIT App Inventor Forum
Thanks for your answer Steve. 

telasAppInventor.png

tela2AppInventor.png

Sorry for not publishing a block image. 

How can i convert the tags for a list?
Thanks for help me

SteveJG

unread,
Oct 10, 2018, 11:25:28 AM10/10/18
to MIT App Inventor Forum
I am not sure how to answer this.  You have serious issues with your Blocks.

Here is a link that shows how to retrieve tag information for a FirebaseDB  https://stackoverflow.com/questions/51644062/firebasedb-values-in-mit-app-inventor  .
It retrieves the information to fixed global variables, you need to do something similar to download as a List.

From your Blocks I am not sure...  this tutorial by Romin might help https://rominirani.com/tutorial-mit-app-inventor-firebase-4be95051c325  

Perhaps you need to download the tag   Clientes      as a List.


Junior Campos Authentik

unread,
Oct 10, 2018, 11:36:09 AM10/10/18
to MIT App Inventor Forum
Thank you so much Steve, for your attention..

I´ll check this. 

Thanks my friend
Reply all
Reply to author
Forward
0 new messages