S
S
sitev_ru2015-10-11 14:37:38
Java
sitev_ru, 2015-10-11 14:37:38

Is it possible to tell the application not to delete activities from memory?

Theoretically, activities can exist for some time, but their existence is not guaranteed by the system, so when they are lost (destroyed to clear memory for other needs) it is impossible to predict and all this will lead to the application crashing at the most unpredictable moment.

Is it possible to tell the application not to delete activities from memory?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andriy Biskup, 2015-10-11
@sitev_ru

You can't, and you don't need to. In order to return an Activity to the state in which you closed it, there are methods onSaveInstanceState() and onRestoreInstanceState()
Documentation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question