FLAG_ACTIVITY_RETAIN_IN_RECENTS constant
int
const FLAG_ACTIVITY_RETAIN_IN_RECENTS
By default a document created by {@link #FLAG_ACTIVITY_NEW_DOCUMENT} will have its entry in recent tasks removed when the user closes it (with back or however else it may finish()). If you would like to instead allow the document to be kept in recents so that it can be re-launched, you can use this flag. When set and the task's activity is finished, the recents entry will remain in the interface for the user to re-launch it, like a recents entry for a top-level application.
The receiving activity can override this request with {@link android.R.attr#autoRemoveFromRecents} or by explcitly calling {@link android.app.Activity#finishAndRemoveTask() Activity.finishAndRemoveTask()}.
Implementation
static const int FLAG_ACTIVITY_RETAIN_IN_RECENTS = 0x00002000;