I have an application which starts a Remote Service in its first launched activity. Then, in another activity, the user can set the configuration of the application. Please
in your restart activity add this
restart.this.finish();
getActivity(otheractivity.class).finish();
Intent in = new Intent(this,main.class);
startActivity(in);
for each of your activity add getactivity(yourclassname) then finish activity. if you add all your activity like this your application close & restart