or closing the app? How can I acess that data?
As I understood, firebase realtime database stores data and when a change in data is produced, you can retrieve the modified data. The app detects an event sent by the fb realtime database, and then downloads the new data. That is useful only with newly added data, but let's say you close the app. ¿Do you have the data from previous session? Lets set an example, an app like whatsapp. New messages are sent by an user to fb rt database, then firebase sends an event, the app detects the event, then downloads new data and displays it. But what if you close and reopen the app? Is the message still being displayed?
If not, how do I access that data? Should I keep data on a sqlite database on my own?
//Edit: The way the app is intended to work is: After data is modified, download new data. When app is closed after data has been downloaded, I want that data(and all previous data the app has downloaded) to still be there, so I can display the data when reopening the app. When app is closed, or there is no internet, then the app waits until there is internet and app is opened to download the new data. The part I do not understand yet is: Does the data downloaded from the server when there is new data disappear from the app after you close the app? Or it does disappear forever from the app memory if you do not save it in your own local database?