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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:40:41+00:00 2026-06-05T23:40:41+00:00

As I understand it, if I don’t explicitly tell Android that I want to

  • 0

As I understand it, if I don’t explicitly tell Android that I want to handle a configuration change in an Activity, it will get torn down and re-created on, say, an orientation change.

Let’s say that I have object O that’s an instance of some class MyCustomClass in Activity A. When the user presses a button in Activity A’s layout, we call O.startActivityB. That method will start Activity B. When Activity B gets re-created on an orientation change, I can tell (some flag was set in another or something), so Activity B immediately runs this:

setResult(RESULT_CANCELED);
finish();
return;

Who is Activity B’s parent activity at this point? Who gets the result code?

  • 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-05T23:40:42+00:00Added an answer on June 5, 2026 at 11:40 pm

    If you started Activity B from Activity A, the ‘parent’ is Activity A. The fact that an activity gets recreated for some reason doesn’t change the activity stack in any way. BTW, if you want to receive a result, you need to use startActivityForResult(), not startActvity().

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

Sidebar

Related Questions

I have this problem that I probably understand but don't know how to handle,
I don't understand the code that comes after The following PHP example demonstrates the
I don't understand what happening with a simple code. I want to resize the
I don't understand why setTimeout is not working as I expected. I want to
I don't understand why is this rule not working? If I change total quantity
I don't understand why this is happening. I need to get the objects startPoint
I don't understand why IList implements IEnumerable taking in consideration that IList implements ICollection
I don't understand the way Raphael or SVG works. I want to create a
I don't understand how you can only get the number of needed rows from
I don't understand the output of this program: int arr[]={1,7,4,2,5,8}; int x=(&(arr[arr[1]-arr[4]])-arr); printf(%d ,x);

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.