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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:41:31+00:00 2026-06-16T02:41:31+00:00

I have my activity registered as Intent filter (plaintext) and have the issue with

  • 0



I have my activity registered as Intent filter (plaintext) and have the issue with receiving multiple intents. This is my situation:

  1. I open email client -> mark some text -> press “Share button” and choose my activity which is correctly listed (as it is registered as intent filter for such action)
  2. My activity opens and I can clearly see that intent has correct values in its EXTRA_TEXT (marked text from email)
  3. So far so good…but now, if I press HOME button (which closes my Activity and seems to call onStop()) -> then I open email client again -> mark some DIFFERENT text -> press “Share button”, then suddenly my activity opens (I would expect the list of available activities to choose from again) and received intent contains the ORIGINAL text and not the newly marked one in its EXTRA_TEXT.

What am I missing here? How to receive new content via intent this way? Do I need to somehow invalidate previous Intent?

I have to say that using “BACK” instead of “HOME” button works correctly and new intent contains newly marked text as expected. What’s the difference here?

I get my Intent this way:

    intent = getIntent();
    intentAction = intent.getAction();
    if (intentAction.equals(Intent.ACTION_SEND) && intent.hasExtra(Intent.EXTRA_TEXT)) {
        Bundle bundle = intent.getExtras();

Thanks

  • 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-16T02:41:32+00:00Added an answer on June 16, 2026 at 2:41 am

    Try setting your Activity launchMode to “singleTop” then implement…

    @Override
    protected void onNewIntent (Intent intent) {
        ...
    }
    

    The Intent passed in to that method should be the new one.

    See the docs for onNewIntent

    EDIT: For future readers – based on the comments below, it seems the documentation may be incorrect and launchMode should be “singleTask” and not “singleTop”.

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

Sidebar

Related Questions

I have registered my activity in the manifest as android.intent.action.SEND. Now, after pressing SHARE
I have an activity that offloads multiple uploads to a Intent Service. Each upload
I have an activity with the following layout. So in this screen, initally the
I have read most posts re this issue, but still can't get my implementation
I have a broadcast receiver registered programatically in a activity. It responds to the
I have this declared in my AndroidManifest.xml: <activity android:name=x.y.z.MyActivity android:label=@string/app_name android:theme=@style/MyTheme > <intent-filter> <action
Before I ask my question I saw android intent filter? and Android: Activity not
I have a few intents that activity sends to service. All of those are
I have this Broadcast receiver registered public class NotifyAlarmBroadcast extends BroadcastReceiver{ public Context context;
I have an Alarm Manager which send Intent to BroadcastReceiver. This Broadcast is not

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.