There are two methods for removing the app from the recent list of app.
1. Using Manifest file
1) Manifest File
As we know Manifest file is used to declare all activities using the activity tag in XML. So if you want to remove the app from the recent list in Android then you are at the right place. We will discuss both methods in this article. In your activity tag, you have to mention three attributes which are listed below.
2) Removing the app from the recent list programmatically in android
We can use finishAndRemoveTask method to remove the activity from the recent app list.
finsishAndRemoveTask method will finish all activities of the app from the current task and remove these activities from the recent app list. But this method will work above API Level 21. Below the 21 API Level, you can use “
FLAG_ACTIVITY_CLEAR_TOP” flag with the intent object.