android - Never call on Create when process is killed -


i'm building app works on nexus 7 without problems , on galaxy s2. i've tested on galaxy s3, somehow memory management far more agressive. if press home button , wait few minutes, oncreate gets called again, assume process has been killed. if process gets killed, particular application, want start activity.

i use overriding onstop , onpause, cause unwanted behaviour, looking @ activity lifecycle. if process isn't killed fine return activity.

is there solution this?

you can use savedinstancestate in oncreate this:

if( savedinstancestate != null ) {             //toast.maketext(this, savedinstancestate.getstring("message")+"--> ", toast.length_long).show();             intent intent = new intent(first.this, second.class);             intent.addflags(intent.flag_activity_new_task | intent.flag_activity_clear_top);             startactivity(intent);             return;         } 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -