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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:54:29+00:00 2026-06-06T08:54:29+00:00

I am experiencing a little pain on Android. I have two activities, one is

  • 0

I am experiencing a little pain on Android. I have two activities, one is a Splash Screen, launched when you click on the app icon, and an other one which can wake up when a specific event occurred (a NFC event, but it is not the problem).

There is the declaration in the manifest :

<activity android:label="@string/general.appName"    android:name=".activity.SplashActivity" android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>

            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
<activity android:excludeFromRecents="true" android:label="@string/general.appName" android:name=".EventReceiver" android:noHistory="true" android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.nfc.action.TRANSACTION_DETECTED">
            </action>

            <category android:name="android.intent.category.DEFAULT">
            </category>

            <data android:host="secure" android:path="/aXXXXX" android:port="0" android:scheme="nfc"/>
        </intent-filter>
    </activity>

All works fine, it means that the EventReceiver is launched when it received a specific event, the Splash Screen is functional etc…
But, when the application is launched by an event, so it is the EventReceiver which is launched first. If I pause the app by clicking on the home button of the phone, and by long clicking on it again, it makes appear the multitask table, with all the recent opened apps. There, is I click on my application, it resumed the application on the EventReceiver, just like if an event had occurred. So do you know a way to resume an application on one selected activity only (in my case the SplashScreen).
Or do you know a way to recognize that the application was resumed by a multitask function ? (I could open the good activity at the onCreate of my EventReceiver too if I get this information).

For the moment, the only solution I found is to put a android:excludeFromRecents=”true” flag on my EventReceiver activity. This will result that the application will not appear in the multitask table if the application was launched by an event. But this is a little bit tricky and I do not like that very much.

Do you have any ideas ?

Thank you very much beforehand for your answers ! (and sorry for my scholar 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-06T08:54:30+00:00Added an answer on June 6, 2026 at 8:54 am

    If you really have to detect when the application is lauched from the “recents” you can use intent flags.

     if (getIntent().getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) {
         // Lauched from recent apps.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a nice little app on the app store that does pretty well
I am experiencing a strange problem: I have a Screen that is using the
I have a nice little app on the app store that does pretty well
I'm experiencing a little bugger using the fancybox jquery plugin. I want to use
I have been investigating event fire order between browsers, because our application is experiencing
I'm experimenting with a treeview in a little C#/Winforms application. I have programatically assigned
So, I'm experiencing a very weird issue with my little test application. And by
I'm experiencing what I would consider somewhat strange behavior. Specifically if I have a
i'm currently experiencing a little problem. I'm using nhibernate with around 40 entities mapped
I' developing a small android maze game and I'm experiencing a strange effect which

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.