Reputation: 3232
I want Don't show my app in recent app when user run or close my app in hdevice
my purpose is: user Disabling to run my app
i am sorry for bad speak .
Upvotes: 12
Views: 5738
Reputation: 12919
excludeFromRecents
is what you are looking for.
Just add this to your Activity
tag in the AndroidManifest.xml
:
android:excludeFromRecents="true"
Upvotes: 5
Reputation: 14847
From Android Doc
Read this.
android:excludeFromRecents
Whether or not the task initiated by this activity should be excluded from the list of recently used applications ("recent apps"). That is, when this activity is the root activity of a new task, this attribute determines whether the task should not appear in the list of recent apps. Set "true" if the task should be excluded from the list; set "false" if it should be included. The default value is "false".
add android:excludeFromRecents="true"
in your xml (AndroidManifest.xml) for the activity tag
Upvotes: 6
Reputation: 24853
Try this..
For your every activity android:excludeFromRecents="true"
<activity
android:name=".Activity"
android:excludeFromRecents="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
For more information refer this doc
Upvotes: 18