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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:58:32+00:00 2026-06-16T07:58:32+00:00

The question title is possibly not clear enough. It addresses the problem of passing

  • 0

The question title is possibly not clear enough. It addresses the problem of passing results from a child activity to a parent activity after the application has been “killed” by Android on low resources condition, and then automatically restored when a user returns to this application.

Suppose an activity A invokes an activity B using startActivityForResult(). While the application execution context is in B, the application goes to background and after some time gets unloaded by the system. Later the user switches back to the application and the activity B is restored without a problem. The only problem is that A does not exist at the moment in Android’s backstack, and when user closes B (finish() accompanied with a proper setResult() call), A does not receive results. Instead of onActivityResult() event, A receives onCreate() and other events from startup chain.

So the question is how to pass results between activities in an application being restored after “killed” state?

UPDATE:

Despite the fact that @fedepaol provided a link to google groups, where someone wrote that onActivityResult should be called in the situation in question, I could not make it to work. I should also note that the OP of that question in google groups did not solve the problem as well. Also I found a similar question here on SO – onActivityResult is not called after process is killed – also without a solution.

I double checked my code and don’t see why it does not work. In normal situation the overridden method is called. If the back stack of activities is restored one by one, it does not.

  • 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-16T07:58:33+00:00Added an answer on June 16, 2026 at 7:58 am

    I am not sure that your onActivityResult would not be called.
    From my understanding (which may not be correct), the os should give you all the instruments to reconstruct the state of A with the onCreate / onRestoreInstanceState methods. After them I expect onActivityResult to be called with the previous result.

    This is also confirmed by this answer by Dianne Hackborn.

    It is also true that you should be handle the case where B gets killed just before returning the result.

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

Sidebar

Related Questions

I think the question title is clear enough: is is possible to stable_sort() a
I'm not sure if my Title for this question entirely describes accurately enough what
http://jsfiddle.net/2Wpfw/3/ I'm not sure if my question title is the best description. I'm after
I do not know if my tile line is clear enough... My problem is:
The title of the question pretty much states the problem. Is it possible?
The question title is a bit strange because I'm not exactly sure how to
I think the title for this question is probably wrong, but I'm not sure
Apologies if the title is vague, but it's not the easiest question to describe.
EDIT : Changed title from inheritance to composition. Left body of question unchanged. I'm
If solution to the problem in title is possible, please guide. I have 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.