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 .
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
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
excludeFromRecents
is what you are looking for.
Just add this to your Activity
tag in the AndroidManifest.xml
:
android:excludeFromRecents="true"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With