Thursday, August 15, 2013

How to avoid having my app shown in the list of recently used apps in Android

How to avoid having my app shown in the list of recently used apps in Android

You have to add android:excludeFromRecents="true" to the activity in your AndroidManifest.xml

Sample code:

<activity
        android:label="@string/your_app_name_goes_here"
        android:excludeFromRecents="true"
        android:name=".SomeActivityNameGoesHere" >
        <intent-filter >
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

No comments:

Post a Comment