Android Activity Lifecycle: restoring app after kill - design problem

atm I try to get my app working around "onSaveInstanceState" and "onRestoreInstanceState", but the deeper I dig, the the more problems occur.

So, for example, I just realized, that restoring one activity via those two functions is pretty useless. Because, if I press the back button and return to the activity before, this one doesn't get its "savedInstanceState" bundle and instead gets recreated completely.

Is there a way to restore the whole application instead of just a single activity? Or is this just a weird design and I shouldn't even bother with restoring one activity?

Kind regards, медуза

Редактировать: окей, глупый я ...

пакет, который получил мое основное действие, не был нулевым, а только в "onRestore ...". В «onCreate» это действительно было null, но так было всегда. (Неважно, вернулся ли я, например, из другого действия после kill или нет)

Итак, теперь я запутался в другом: я тестировал это раньше в другом действии, и вот, пакет saveInstanceState "onCreate" и "OnRestoreInstanceState" где то же самое! Это просто случайность или что-то особенное из основного занятия? (Пробовали также разные режимы запуска, но они не помогли).

5
задан jellyfish 19 May 2011 в 09:24
поделиться