Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8070831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:31:07+00:00 2026-06-05T13:31:07+00:00

Let assume we have two activities. A – main activity, that is home launcher

  • 0

Let assume we have two activities.

A – main activity, that is “home launcher enabled” (proper intent filters etc.)

B – task root activity with singleTask specification (there can be only one instance of this activity) and with custom taskAffinity (to differentiate if from the main task root).

Let assume that B represents a task, that is valid only when it is not finished – returning to it or starting it again from recent tasks after finishing it is not an option.

In some point of the time – A starts B to begin a new task. The goal is to remove B from recent task list when user finishes B. User may navigate from B to other tasks (using home long press) and then navigate back to B as long as it is not finished. Launching A from launcher won’t bring B to the foreground as they have different task affinities.

Android recognizes B as a root of a task, thus B is visible in the recent tasks list even if it is finished, and user can always go back to it. It is not a solution to move B to the one task with A, because in the time B is running – user should be able to switch between A and B tasks. Adding excludeFromRecents to B’s manifest removes it completely from recent tasks list, and it is bad solution too.

How to achieve it? (sorry for my bad english)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T13:31:09+00:00Added an answer on June 5, 2026 at 1:31 pm

    Standard Answer

    Sorry to be the bearer of bad news, but this functionality cannot be achieved utilizing standard methods without overriding the way that your app works. Even then, it will only work for as long as your app is running. Furthermore, doing so will require a rooted device with a specialize ROM because you cannot override the functionality of the Home button in anyway. All you can do is respond to onNewIntent() which does not fire if you are long pressing the Home button.

    Recent Tasks is specifically for ease of use to the user to allow them to get back to whatever apps they have been using, regardless of whether the app is running. There is good news, however. This process is not keeping your app alive! It is simply an icon pointing to your package.

    Unfortunately, this means that if your app is still running, something else is going on that is keeping it running.

    Non-Standard Answer

    It may be possible by editing the package properties during run-time (much in the same way that you can enable/disable components from java code). This is highly discouraged, because Recent Tasks is a usability feature of the Android core platform. This would require some research.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's assume I have two gmdistibution models that i obtained using modeldata1=gmdistribution.fit(data1,1); modeldata2=gmdistribution.fit(data2,1); Now
Let's say we have two objects. Furthermore, let's assume that they really have no
Let's assume I have a main script, main.py, that imports another python file with
Let's say I have two variables, protected_var1 and protected_var2 . Let's further assume that
Specifically, let's assume that we have two sensible models: TieDyeCentipede , which has_many :legs
For example, let's assume that i have two QuerySEt objects: queryset1 = my_model1.objects.all().order_by('-created') queryset2
Let's assume that I have two tables... Foo and Bar. They contain the following
I have some question about linux-kernel, let's assume that I have two threads in
I have two tables: boughtItems(buyerId,ItemId) and denormalized(buyerId,item1,item2,item3,item4,item5) Let's assume that in boughtItems table each
Let's assume we have two arrays of the same size - A and B

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.