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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:41:39+00:00 2026-05-20T10:41:39+00:00

Activity A started B using startActivityForResult, and B started C using startActivity. After that,

  • 0

Activity A started B using startActivityForResult, and B started C using startActivity. After that, the activity stack is A B C.

Now suppose, C makes startActivity call on B using FLAG_ACTIVITY_REORDER_TO_FRONT flag, then the activity stack will become A C B.

My question is, now, if B finishes itself, will onActivityResult() in A be called due to B’s exiting?

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-05-20T10:41:39+00:00Added an answer on May 20, 2026 at 10:41 am

    Judging by the documentation for finish():

    Call this when your activity is done
    and should be closed. The
    ActivityResult is propagated back to
    whoever launched you via
    onActivityResult().

    This leads me to believe that A will get B’s result even if C is in between the two.

    Edit – after some testing I discovered some interesting interactions here.

    The order of events, after some logging:

    1. A started
    2. B started
    3. C started
    4. B resumed (with FLAG_ACTIVITY_BRING_TO_FRONT)
    5. B finished
    6. C resumed (it was under B)
    7. C finished
    8. A resumes and gets B’s result

    In other words, A gets B’s result as expected, but it happens after C finishes and A is resumed.

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

Sidebar

Related Questions

I am new to android.. just started writing service using activity.. i want to
I have a test that is using an ActivityMonitor to wait for an activity
I have an activity that has a TabHost containing a set of TabSpecs each
Sampling with Activity Monitor/Instruments/Shark will show stack traces full of C functions for the
For tracking user activity, I am using a Windows Hook for the main application
I have an activity. In this activity I want to start another activity using
I just started using C# and I've got a couple of issues. Is there
I'm using Apache Commons to make my HTTP calls, and in my activity I
Hey. I just started with Android. I'm using the ViewFlipper layout with 2 LinearLayouts.
I recently started using android actionbars and contextual action bars (CAB). I have just

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.