Saving Instance State…again

by Andres Amador / from beautifuldecay.com

I’ve posted sometimes about save instance state on activities (in portuguese), but I could observe that I’ve writen that Android OS can kill your process when it needs memory, so the activity can be destroyed anytime. I’ve written too that when it happens Android will give a chance to developers finish any threads or connections respecting the life cycle until the onPause() method. Actually, it’s not the complete true, its more a good practise.

Prior to Honeycomb the onSaveInstanceState() was called before onPause(), so the OS respects the life cycle until the onPause() method. It’s changed after the Honeycomb , the onSaveInstanceState() was called before onStop(), so the OS respect the life cycle util the onStop() method.

In both cases the OS is going to respect the life cycle until the onPause(), and that’s why I’ve written to think in this method as a last chance to save or close everything, because it meets any situation.

Um comentário em “Saving Instance State…again

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair /  Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair /  Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair /  Alterar )

Conectando a %s