I have to restart my application at an interval such as 1 hour. But when i try the code below, a new ctivity is starting but the activity which i want to close is still running on background as a thread :S
What do i have to do? Thanks..
if (timeOutOK) {
finish();
Intent i = getBaseContext().getPackageManager()
.getLaunchIntentForPackage(
getBaseContext().getPackageName());
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(i);
}