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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:30:27+00:00 2026-05-18T06:30:27+00:00

So I was trying a hack to put a quick bandaid on an issue

  • 0

So I was trying a hack to put a quick bandaid on an issue I’m having that’s described in another question I have posted.

I have a sub-activity that was kicked off by my main activity and it can also be stopped by the main activity calling finishActivity(requestCode) on it. However the sub-activity is always returning 0 after the finishActivity call – even though I only set that result in the sub-activity if the user presses the back button. I tried to cheat by calling setResult(RESULT_OK) in the sub-activity onResume method, but that seems like it makes no difference;

Also, for some reason it is taking a long time before the onActivityResults come in. Is that normal?

Thanks for any advice!

  • 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-05-18T06:30:27+00:00Added an answer on May 18, 2026 at 6:30 am

    Observed the same bahaviour. In the main class that calls finishActivity() I had to remember ID of the Activity that I forced to close, so when it returns back in onActivityResult I can distinguish two cases:

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
    
        if (resultCode == Activity.RESULT_CANCELED) {
            switch (requestCode) {
                case OUTSOURCED_INTENT:
                {
                    if(mForcedClosingOfOutsourcedActivity)
                    {
                        //Handles case of forced closing
                    }
                    else
                    {
                        //Handles case of normal closing from Activity
                    }
                }
                break;
            }
        }
    }    
    

    Definitely, it is not OK to wait so long time until Activity close.

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

Sidebar

Related Questions

I am trying to build a quick hack that likes all the recent photos
I have been trying to hack the fuzzyflakes screensaver so that it'll change the
I'm trying to do something like the min-height hack , but I have two
I'm trying to hack together a datagridview in c# that can handle hierarchical data
I'm trying to hack another program by changing the EIP of it. There are
First off I would like to say, that I am not trying to hack
Hey all, weird question. My company has an application from another company that records
I'm trying to hack a 3rd party JavaScript pop-up and I need to somehow
I'm trying to hack my own dependency injection container in PHP, based on constructor
I've been trying to 'hack' 2 programs together and one of them (openTLD) uses

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.