In android, why service's oncreate() method invokes twice when the activity starts and destorys -


in main activity's oncreate(), code is

intent intent = new intent(this, sampleservice.class); startservice(intent); 

in service's oncreate(), code

toast.maketext(this, "oncreate", toast.length_short).show(); 

when start activity, shows "oncreate", when remove activity recent application list, shows "oncreate", why???


Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -