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 6018861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:20:09+00:00 2026-05-23T03:20:09+00:00

I have an app designed for a tablet in a workplace setting where a

  • 0

I have an app designed for a tablet in a workplace setting where a number of people will use the camera as part of their routine. While it’s appropriate and necessary for a supervisor to leave the app, it should be difficult for other people to accidentally do so. However, a long press of the home key is pretty easy to do accidentally. I’ve done it myself. That brings up a list of recent tasks; the user can tap any one of them and they’re lost, since some of them aren’t as sophisticated as your average smartphone owner.

Programmatically you can retrieve this list via getRecentTasks. My question is how I can remove all but the most recent task (mine) from that list, reduce the length to just one element, or change the listed tasks to point back at my application. I know this is possible: Toddler Lock does it.

My first attempt was to modify the intents returned, in hopes they were passed by reference. No such luck. Any other ideas?

(I’m not talking about a short press of the home key. I already figured that one out, partially based on things found here.)

  • 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-05-23T03:20:10+00:00Added an answer on May 23, 2026 at 3:20 am

    Credit goes to the author of Toddler Lock, with whom I spoke about the issue. Errors introduced are entirely mine.

    Create within your manifest a disabled activity with affinity equal to the empty string. In your program, enable it and then start it up using an intent flagged FLAG_ACTIVITY_NEW_TASK. It will show up in the recent activities. Disable the task and it disappears from the display.

    Make enough of these and you flood the recent activities display. If it has a way to go back more activities than you have dummy activities the user will be able to get out of your program.

    Make sure you disable the tasks when you exit, and make sure that if you select one of those tasks from recent activities your program does something reasonable.

    Here’s an example of two of the tasks in my manifest:

        <activity android:name="com.foo.android.recentactivity.Clear1"
                  android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                  android:label="."
                  android:enabled="false"
                  android:icon="@drawable/clearicon"
                  android:taskAffinity="" />
        <activity android:name="com.foo.android.recentactivity.Clear2"
                  android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                  android:label="."
                  android:enabled="false"
                  android:icon="@drawable/clearicon"
                  android:taskAffinity="" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a wxpython app designed using XRC which has a multiline textctrl inside
I have a website designed for the android browser using jquery/jqtouch. As a part
I have a mixed web/native app, and I use a (you guessed it) UIWebView
I have a new web app that is packaged as a WAR as part
I have designed an app in vb.net 2005 that at one point adds and
We have an app with an extensive admin section. We got a little trigger
I have an app that needs to open a new window (in the same
I have an app with a large ListView which is terribly slow so I'm
I have an app using PHP and the PayPal API. The basic way it
I have an app written in C# that lies on a network share. When

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.