I am currently trying to handle the exit and restart of my app.
So when I press the home button my app closes and the android home screen is visible. The app process still remains in the process list - this is how its supposed to be.
When I then go back to my app, I want to start it again just like i started it the first time. I have only 1 activity and here is what i do at the moment
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
this.finish();
}
So the activity closes properly - this leaves me with a blank activity when i resume my app.
Unfortunatly I dont know how to change the behaviour that the activity is created again.
Edit
@Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
callResume++;
if(callResume > 1)
{
Intent newInt = new Intent("android.intent.action.MainActivity");
startActivity(newInt);
this.finish();
}
}