I am creating an Activity with android:launchMode="singleTask". In the app, there is another class, not declared in the activity, which keeps itself a static final instance and some journal to show in the activity. When I try to finish the activity by press the back key. The log show the activity is destroyed, as I put
@Override
public void onDestroy() {
super.onDestroy();
Log.d("I am destroyed", ".");
}
code in the activity. However, when I start the app again, I find the activity is still the same as I leave it. Then, I press the back key, and remove it from the recent apps list manually. And run the app again. This time, the app shows as it should be.
What's the different between press the back key to finish a app and remove it in recent apps list? And what should I do if I want to finish the app as normal apps do?