F
F
furyon2015-10-12 00:10:47
Android
furyon, 2015-10-12 00:10:47

How are objects stored in Android?

Hello!
Let's say there is an Activity and it has a custom object stored in its properties (in fact, it contains only data). More fragments from this Activity work with this object.
Question: if, for example, while working with an application, I collapse it on this Activity, and then deploy it after a long time (in a day or a week, for example), can I be sure that this object still exists and I can continue to work with it from fragments in that number?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andriy Biskup, 2015-10-12
@furyon

if the process is killed (and in a day or a week it will be destroyed with a probability of 99%) then the data is lost. I think you should store this data using SharedPreferences

Z
z0rgoyok, 2015-10-12
@z0rgoyok

everything is lost, open the database in Application.onCreate and drag the data from there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question