android - Application onCreate() NOT getting called everytime -


i have important initialization when app starts. found best way put code inside oncreate() of class extends application class.

class applicationdemo extends application{  public void oncreate(){  super.oncreate();  log.d("log", "inside oncreate()"); }  } 

the problem

i not find log statement executed every time app run. start app first time, log statement, close app , start again launcher. no, log statement doesn't come.

what problem? how can ensure particular code run every time app run , before else performed?

my guess have open application just once.

i'm pretty sure that, after closed application, goes background, waiting put in foreground again. (it not created again, reuse have created.)

try making sure killed process of application before re-opening it; make sure closed & reopen it, , not simple background-foreground thingy.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

javascript - How to insert selected radio button value into table cell -

css - Transitioning Transforms in Safari look terrible/shaky/stuttering -