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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:14:42+00:00 2026-06-13T09:14:42+00:00

I started an temp activity from notifiation, just show some text messages.Whatever I set

  • 0

I started an temp activity from notifiation, just show some text messages.Whatever I set launchMode=singleInstance or noHistory=true, The temp activity showed last time will show again when enter from “Recent open”. I want temp activity to be shown only if I clicked notification, don’t show in the “Recent open”. Thank you in advance.

    <activity
        android:name=".NotifiticationDialog"
        android:launchMode="singleInstance"
        android:noHistory="true"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" >


            Notification notification = new Notification(R.drawable.icon, context.getString(R.string.app_name), System.currentTimeMillis());
            Intent intent = new Intent(context, NotifiticationDialog.class);
            intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
            PendingIntent activity = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
            notifycation.setLatestEventInfo(context, context.getString(R.string.app_name), message, activity);
            notifycation.flags = Notification.FLAG_AUTO_CANCEL;
            _nm.notify(NotifiticationDialog.ID, text);

EDIT:
@Lalit Poptani, I tried what you suggest, but it is not waht I need. After I click temp activity with android:excludeFromRecents=”true”, My app disappeared in “Recent”.(user can’t find it, my all activity is excluded)

EDIT:
Fact: I have 3 tmp activity showing some text just like toast did, 2 were opened from widget and they didn’t mixed with app stack. 1 were opend from notification, it always show itself individually from “Recent”.

    <activity
        android:name=".AppwidgetDialog1"
        android:launchMode="singleInstance"
        android:noHistory="true"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" />
    <activity
        android:name=".AppwidgetDialog2"
        android:launchMode="singleInstance"
        android:noHistory="true"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" />
    <activity
        android:name=".NotifiticationDialog"
        android:excludeFromRecents="true"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" >

  • 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-13T09:14:44+00:00Added an answer on June 13, 2026 at 9:14 am

    For removing your Activity from Recent Apps you can use android:excludeFromRecents, so try adding android:excludeFromRecents="true" to your Activity tag.

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

Sidebar

Related Questions

I just started working with SQL Server and I have some troubles with adding
I get this error from appharbor: Build started 5/31/2012 4:52:13 PM. Project D:\temp\woojnpbm.drx\input\wsolver.sln on
I have just started using GAE (Python 2.7 SDK 1.6.4) , I have set
Started learning algorithms. I understand how to find theta-notation from a 'regular recurrence' like
Started making a game. Here's some of my code. package games.tribe.screens; import games.tribe.model.World; import
Today I started observing some new kind of error which does not allow me
I started trying to implement drag-and-drop of virtual files (from a C# 4/WPF app)
I have just started reading a C++ textbook and I am having trouble solving
I have just started to practice c++ and I am stuck at one point.
I just started looking at structs in C++ and thought I might try and

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.