Save object for later use, if my app is killed

view story

http://stackoverflow.com – If android OS kills my application (which uses service ) due to low memory, then it will try to run it again. From android.developers site: *Note this means that most of the time your service is running, it may be killed by the system if it is under heavy memory pressure. If this happens, the system will later try to restart the service. * If i have in my main activity code like this: public static MainActivity mainAct; protected void onCreate(Bundle savedInstanceState) {mainAct = this;} When android OS kills my application value of mainAct is lost, because its initialized only onCreate( (HowTos)