android - Cases when savedInstanceState is NOT null -


if not explicitly call onsaveinstancestate(), possibilities, when savedinstancestate not null in oncreate?

i see 1 option, when system recreates app after crash - savedinstancestate not null.

which other options?

which possibilities, when savedinstancestate not null in oncreate()?

  1. system on shortage of memory, killed process of app. user navigates app, oncreate() called non-null bundle.
  2. after configuration change (e.g. orientation change) - oncreate() called non-null bundle.

if not explicitly call onsaveinstancestate()

you shouldn't on own. it's system call activity lifecycle methods , onsavedinstancestate/onrestoreinstancestate.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -