S
S
Sergey Shilovsky2018-11-12 09:14:53
Android
Sergey Shilovsky, 2018-11-12 09:14:53

Where to store temporary application data?

I receive a bunch of data from the server that are used in different parts of the application. Now I use static fields of special classes, but as I understand it, they can be reset during program operation. Another task that static classes can solve is the transfer of data between activities, without making them serializable, which can be very expensive, because. classes have many different fields. SharedPreferences and SQLite seem like overkill to me, just to have access from different places in the application.
What are the options for storing such data? What if we create a class object for storage in Application? After all, it should live all the time the application is running.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
raxmatart, 2018-11-13
@First_Spectr

a1289de09bf73c94.png
Already a de facto standard scheme for working with the network, I don’t understand such a negation of sql, in many applications DB = source of truth, rely only on the network - do not let the application work when there is no Internet, only usually RxJava is used in dataSource instead of LiveData.
Screenshot from codelabs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question