Save everything when the app is closed

Hey,
I want to save everything in my app when the app is closed so that when it’s re-opened then everything will be as it was before closing the app. I made a youtube sort of app and I want to save everything so it’s sub count, all the variables, and all the videos, so title, likes, views, dislikes, font size of the title, and all of that. Is there an easy and quick way to do it?

(I can send the .aia file if necessary)

This will help ;
https://docs.kodular.io/components/storage/tiny-db/

Thanks, I know that you can do it with TinyDB, but it would have to be done for every single component which is the text, the font size and for every single video and it’s just so much work. Plus it has to be loaded back in when the app starts and I don’t know how to do that for each video.

And I’m pretty sure that’s a feature in mit app inventor. When you export the app when you close it the whole data saves without you doing anything.

No that can not be done without any work from you for instance by using a TinyDB.

Oh okay, thank you. Can I send you the .aia file and can you have a look on how to do it please? Because, I don’t know how to save it effectively and then for each video load it back in, I think you have to use a list and then for each item in the list load the data or something, sorry I’m really bad at this. And I really want it done, because I was working on this app for a lot of time and don’t want it to go to waste.

No you can not send it to me. You can post your blocks here on the community if you want.

Show what you have tried yourself to save all data from your app.

There’s too many blocks and they are too tall tho… + I don’t know how to do it, that’s the thing.

It seems you made a wrong start. First learn the basics of any blockbuilder and then think about making a more complicated project like what you are doing it seems.

You also have not much reading time on the community. It has a lot of topics you can learn from.

https://docs.kodular.io/

I think these block will works properly in some cases :sweat_smile: :sweat_smile:

component_event

Thank you. I noticed them too, the problem is that I don’t know how to properly save the videos and then load them back in. Because they are dynamic components, and I don’t know how to work with lists and I’m pretty sure it has to be done with the block for each item in list do. Any ideas?

(the blocks are too high and there’s too many to send screenshots so I can send the .aia file if you want to have a look)

do you mean download ??

you can save a cache data in the phone’s memory, and when the app is reopened then the video is loads so fast

No sorry, I put it the wrong way. By videos I mean dynamic components like the title, views, likes, dislikes, description, few layouts to make it look good and the video player.

Yes, You can do it with tiny database

How to do it

When all data is loaded then first of all save current data or loaded data in tiny db

When the app is reopened then you need create a list with the tiny db values and if the tiny db value is not matched with your Airtable/Firebase Database Then you can renew the tiny db values and create a new list

this method is works with/without internet and a slow internet connection also