Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Remove application from Recent Apps

Tags:

android

I am developing an android application. If I close my application, my app available in the "Recent Apps" List. Now I don't want to show it in "Recent Apps". How can I remove it from "Recent Apps List" after closing my application programmatically. Please can you share your suggestions.

like image 481
Manoj Avatar asked Dec 02 '22 20:12

Manoj


2 Answers

In you Manifest.xml, set the following to your Root Activity

<activity
    android:name=".Your_Root_Activity_Name"
    android:excludeFromRecents="true"
    .... 
</activity>

Depending on the results, you might also have to use the android:noHistory="true" attribute. But not sure if it is required in your case.

For more information about this: http://developer.android.com/guide/topics/manifest/activity-element.html

like image 190
Siddharth Lele Avatar answered Dec 10 '22 11:12

Siddharth Lele


Add excludeFromRecents="true" to your activity in AndroidManifest.xml:

<activity android:name=".MainActivity"
          android:excludeFromRecents="true" ...
like image 35
Kerim Oguzcan Yenidunya Avatar answered Dec 10 '22 13:12

Kerim Oguzcan Yenidunya