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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:07:19+00:00 2026-06-18T14:07:19+00:00

I have a simple Android application that operates on some text data. The app

  • 0

I have a simple Android application that operates on some text data. The app is invoked two ways: 1) launching the app from the launcher and entering the text data manually, or 2) using the SEND intent to share some text with it.

When launched through the launcher, everything behaves as I expect. When launched through the Share feature and subsequently using the app switcher/recent apps button, the application appears as “Android System” and disappears if I switch away from it. I’d like it to appear in that list like any other app and persist when switched away from. So the question is: why does my app behave differently when launched from the different intents? I’m sure there’s some fundamental thing I’m not understanding about Intents, Activities and Tasks, but I can’t determine where even to look.

Here’s the relevant section of the manifest.

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.example.stub2.Main"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter>
          <action android:name="android.intent.action.SEND" />
          <category android:name="android.intent.category.DEFAULT" />
          <data android:mimeType="text/plain" />
        </intent-filter>
    </activity>
</application>
  • 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-18T14:07:20+00:00Added an answer on June 18, 2026 at 2:07 pm

    For example the user calls your activity Main with ACTION_SEND along with some text abc. Another time, he calls Main with text zzz. Then you will have 2 instances of Main in recent list, with different intents.


    Edit

    You can register ACTION_SEND with an “adapter” activity like AdapterActivity, then forward the text to Main. By this way, your app (Main activity) will be only listed in recent apps if the user starts it from the launcher.

    <activity
        android:name="AdapterActivity"
        android:excludeFromRecents="true" />
    

    There are more activity tags here.

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

Sidebar

Related Questions

I have a simple Android native java application that reads data from a Bluetooth
i have this android application that requires to load data from a remote server
I have a simple Android application that uses a JAR I have built. When
I'm developing a simple Android application that would have an action bar on the
I have written a simple Android application that uses a sqlite database which is
I have a simple (?) Android application that begins with an Activity (First Activity)
I have an Android application that has many user preferences. Some preferences are custom,
I have an android application that reads an XML file and presents some information
I am trying to create a simple Android app that will have the possibility
I have a simple Android application that has a TabBar and one of the

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.