How to load Categories with Image & Quotes (from Firebase) into Cards

I have a problem with the button event in screen 1, when I add a link and text in the text box, I want to see this structure in Firebase,
I have a problem with the button event in screen 1, when I add a link and text in the text box, I want to see this structure in Firebase,

{
“Categories”: {
“Motivation”: {
“image”: “https://example.com/motivation.jpg”,
“data”: {
“1”: “Believe in yourself and all that you are.”,
“2”: “Dream big and dare to fail.”,
“3”: “Success is not final, failure is not fatal.”
}
},
“Love”: {
“image”: “https://example.com/love.jpg”,
“data”: {
“1”: “Love is not what you say, love is what you do.”,
“2”: “In true love, there is no ending.”,
“3”: “You are my today and all of my tomorrows.”
}
},
“Friendship”: {
“image”: “https://example.com/friendship.jpg”,
“data”: {
“1”: “Friendship is the golden thread that ties the heart of all the world.”,
“2”: “A real friend is one who walks in when the rest of the world walks out.”,
“3”: “Good friends are like stars, you don’t always see them but you know they’re always there.”
}
}
}
}

But it doesn’t seem to be happening
And I can’t get the data from the db on the home screen, which is what confuses me, I’m trying but …:relieved_face::relieved_face:

Why are you using this method, instead of getting the data manually with when screen1intiallize? Just get the data and use it, what if you enter incorrect value?

1 Like

On screen 1 there is an admin system, from which in the future I can send data in the form of images and text directly, and the sent data can be displayed on the home screen, which is what I need.

Also you marked your post as solution, why? Does that mean you fixed it?

Edited can you focus on fixing the issue first? Also screen one it’s a door, anyone need to enter inside should pass through that door (screen one) so admin panel can’t be in screen one

:green_heart:

To correctly save the data in JSON format, you need to use this method with the Web component.

I suggest you check out this website, it has really a lot of useful information.

:raising_hands:TimAi2 :raising_hands:

1 Like

No, that was a mistake, sorry, my problem is not solved yet, that’s what I’m focusing on.

Hello,

this post seems to be very relevant to my question, I also want to create a similar project, but there are some differences, I want to send data of this type from my app to Firebase first, and then load it into the app, but I don’t want anything called a project bucket, I just want to see the tag, when I load the data, I also want to store the image in it, this project is very similar to my project, only I want to configure the admin app

admin_app(2).aia (56.6 KB)

{
“Motivation”: {
“image”: “https://example.com/motivation.jpg”,
“data”: {
“1”: “Believe in yourself and all that you are.”,
“2”: “Dream big and dare to fail.”,
“3”: “Success is not final, failure is not fatal.”
}
},
“Love”: {
“image”: “https://example.com/love.jpg”,
“data”: {
“1”: “Love is not what you say, love is what you do.”,
“2”: “In true love, there is no ending.”,
“3”: “You are my today and all of my tomorrows.”
}
},
“Friendship”: {
“image”: “https://example.com/friendship.jpg”,
“data”: {
“1”: “Friendship is the golden thread that ties the heart of all the world.”,
“2”: “A real friend is one who walks in when the rest of the world walks out.”,
“3”: “Good friends are like stars, you don’t always see them but you know they’re always there.”
}
}
}
}
And I wanted this data in this format.

I moved your request from that topic because it doesn’t seem to be the same issue and in this one we hadn’t found a solution yet.

we left off here

Did you have problems writing the data to Firebase?
Also regarding the loading, could you describe in detail what problems you encountered?

Yes, when I sent the data, it didn’t look structured the way it should.

Have you tried using the Web component?
Unfortunately, Firebase doesn’t correctly save the data in JSON format, with the Web component you can use dictionaries directly, which are very convenient.

1 Like

OK, it is ready, but I want to add a tag key called item’s data to it, and I want to add many values ​​to it,

In which node exactly?

1 Like

Inside the item, above the image, under the data name, and inside the data, multiple values ​​should be added from text box 3.

Hi Boby,

In Tim’s guide you really have everything you need, but briefly, to insert data into your Firebase using the Web component (let’s remember that in my opinion the Firebase component is not recommended except for the .DataChanged function)


You set the URL by specifying the tag where you’re going to write in the URL.

https://firebaseproject.firebaseio.com/item1/NewTag.json

And do a PUT with a dictionary containing the key and the value to be saved.


immagine


Above? Inside “item1”?

If you want to add new values to an existing tag, in this case “NewTag”, without overwriting the whole node, you just need to perform a PUT while specifying in the header X-HTTP-Method-Override: PATCH.


The only “problem” is adding data to a list since there isn’t really a built-in way to do it, but it’s not impossible.

Option1

doing a POST Firebase will create key/value node with unique keys.

Option2

We save the position of the last element and keep incrementing step by step (not recommended, since if we don’t carefully check changes on the database, two users could end up overwriting each other’s data).

1 Like

Now just help me with the last thing, tell me how to show that data from Firebase in the recycle list view in my app, thank you.


marathi_qoute(1).aia (620.5 KB)

Have you already studied a bit how the RecyclerList works?

At the bottom of the topic, there is also a well-made example.

Anyway, I see that you’re specifying a bucket marathi_qoute that doesn’t exist in your DB.
You should create a node above everything called marathi_qoute and put the items inside it.

I also see that you don’t have an updated version of RecyclerList.
Download version 1.0.3 from GitHub and update it.

1 Like

I used some of these methods but this error is coming, the data is not loading.

Update the Recycler List to the latest version
and here a super simple example that creates some buttons with the new version.
immagine


SimpleRecycler.aia (124.0 KB)

I asked how to get data from Firebase, I am having trouble setting up blocks, I know about the new recycle.

The error you see has been added to the BugTracker and will be fixed.

Since it’s a generic error, I’d ask you to check what you’re getting as response and whether it’s consistent with the subsequent functions.

Use a MessageDialog to understand it better.