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

  • Home
  • SEARCH
  • 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 8453845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:51:59+00:00 2026-06-10T11:51:59+00:00

I have a problem with resume/pause application. Now, suppose that we have an activity

  • 0

I have a problem with resume/pause application. Now, suppose that we have an activity that I override onBackPressed() method and redefine for this method is as follows :

@Override
public void onBackPressed() {
    moveTaskToBack(true);
}

So, it ran in background without any problem. So, To resume my application, I declare following code in onResume() override method :

@Override
protected void onResume() {
    Intent resume = new Intent(this, MainActivity.class);
    if ((resume.getFlags() & Intent.FLAG_ACTIVITY_REORDER_TO_FRONT) != 0) {
        resume.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
        Logger.e(M_tag, "Resume Activity");
        startActivity(resume);
        return;
    }

    super.onResume();
}

After minimizing the process, I can successfully resume the activity, but the problem that i faced with it, is when I long press on a link in Internet Browser and share link with my application, it resumes the activity but don’t run the condition

if (getIntent().getAction().equals(Intent.ACTION_SEND))

that i defined in the onCreate() override method, like below :

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    if (getIntent().getAction.equals(Intent.ACTION_SEND))
        Log.e("App", "In action send mode");
}

I’ve tested Intent.ACTION_SEND action while no process in background, and it successfully runs the condition, but now, how can I force my applicatin to run ACTION_SEND intent ?

Thanks in advance.

  • 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-10T11:52:01+00:00Added an answer on June 10, 2026 at 11:52 am

    If you are not getting OnCreate for a new intent you will be getting OnNewIntent.

    Handle the intent again in this method.

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

Sidebar

Related Questions

I have a nice problem. I have an application that suspend the request and
I have a problem in an application that occurs after the application is destroyed
i m writing an application n stuckup with one problem.I have three activity A,B
I have problem with my query on C, I’m using the oci8 driver. This
I have problem with show or hide form in Window Form Application. I start
I have problem with context menu. I have got: @Override public void onCreateContextMenu(ContextMenu menu,
This should be simple. Yet, it's giving me Hell. Problem I have compiled the
I've built a few services in Delphi 7 and did not have this problem.
I have a Python application (with GUI, using PyQt4) that gets spawned by the
I have a handler that I am using as follows: handler.postDelayed(Play, 1000); when my

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.