for some time I’m trying to find the best way to solve the issue of synchronize getting data from Firebase Storage and Database. To give a better undersatnig of the problem: my app presents some data in the form of a Expandable ListView (Expandable ListView Extension for Kodular , Thunkable , Appybuilder - YouTube). To build the list I use data from Firebase Database, for the images I use Firebase Storage (with the external extention: [Free] FirebaseStorage Extension v2.0 (New Version) - ClassicExtensions - Community). Everything in the test mode worked fine so I exported the apk and instaled it on my phone - and the problems began.
First run and I got runtime error with not much a message/code but I’ve manage to corect the app by forcing to get the data in the order of clicking some button. I realized that acctualliy on the phone I can have very bad internet connection so the answe from the storage and database can be different and need to be sure that I have all the data before buiding the list. The problem is that I have only blocks: “When Firebase Database Got Value” and “When Firebase Storage Response” and they cant be triggered in some order - I need to what for them. Of course I could set some counter for each call, but the number of times I call database and storage is not equal (I call with function: for each). So finally my question is:
How to check if the app got all the data from calling Firebase Database and Storage?
Hello Abdrzej_J , A very warm welcome to kodular community
Can you please share the reference blocks for much more better answer ?
I know that firebase database sometime takes a while as in my recent project it was taking a while longer so i am now using airtable hope using that will give you faster results in bad internet conditions
The problem is with the PROCESING that uses values that are from Firebase Database and Storage. I don’t know how to check if the app has all the data from Firebase.
As for the Airtable I’ll have a look, but I like the JSON style of data structure in Firebase, and I’m quite sure that in real life we can have different quality of internet connection so this type of check should can be usefull.
I have a another way to do this when screen initialize call F_DB and when you got data from firebase database call F_S and when firebase storage response call PROCESING this will help you to get data efficiently and you will have all data at the end
The got data block which you are using will ensure that your app got the data and the firebase storage response will ensure you got url you just use if else in firebase storage block to ensure that they have got data