简体   繁体   中英

How to avoid my android application to be shown in the “recent apps” list?

I developed an android application and I want to avoid it to be shown in the "recent apps" list.

Is it posssible to do that in my code?If yes, How to do that?

在此处输入图片说明

place this line in your application manifest

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

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

. . . .

place this tag in side activity tag, which activity you have to hide from recent, place this tag to that activity.

try:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM