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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:50:52+00:00 2026-06-06T18:50:52+00:00

I’ve got a Application with 4 activities, A, X, Y, and Z. A is

  • 0

I’ve got a Application with 4 activities, A, X, Y, and Z.

A is a kind of landing Activity, which displays a bunch of information from a database for the user.

X, Y, and Z are Activities started by A to modify the data. These activities do not actually query the database, but rather return the changed information to A, which does all the work in onActivityResult. The flow is always A -> X or Y or Z -> A. This works perfectly.

What I’d like to do is make it so that the user can navigate between X, Y, and Z any number of times until a save button is clicked. This would modify the flow such that A -> X -> Y -> Z -> A is possible. However, the data only needs to be persisted from the Activity that clicks save, in that example Z. A would then receive the result from Z, handle this change, and continue. If the user navigates in this way, it doesn’t matter what happened in X and Y, they have been discarded.

I’ve made a few attempts at this. My best was by calling finish() immediately after X, Y, or Z starts another activity that’s not A. This allows the user to return to A when clicking save, meaning the navigation aspect of it is correct, but the result code that gets sent is always RESULT_CANCELED. I’ve looked into using the Intent flag FLAG_FORWARD_RESULT, but I don’t have experience with it and it throws an error when used with an activity that was already started for result. I’m not sure that’s even the right technique to be exploring, because from what I’ve read its only used if there will be one activity in between the calling activity and the one that returns the result.

Is such a flow even possible? Basically, I need an Activity to launch another for result, allow the user to perform some arbitrary amount of navigation from that second activity, then return a result to the original activity when they’re done navigating. Its possible to just modify the code such that X, Y, and Z do the database access themselves, but I would rather avoid it if I could.

  • 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-06T18:50:54+00:00Added an answer on June 6, 2026 at 6:50 pm

    However, the data only needs to be persisted from the Activity that clicks save,

    It seems to me the simplest thing would be not to use startActivityForResult(...) in Activity A and just use startActivity(...) followed by finish() to terminate Activity A.

    Then, when any of the other Activities have their Save button clicked get them to call startActivity(...) for Activity A and pass the data which needs to be saved as Intent extras.

    You then just need to use getIntent() in the onCreate(...) method of Activity A to get what is effectively the ‘result’. If the Intent is null or doesn’t contain expected data to be persisted, then this is a ‘first-launch’ scenario but if the data is there, you’ll know Activity A was started as a result of a Save operation in one of the other Activities.

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

Sidebar

Related Questions

I have a view passing on information from a database: def serve_article(request, id): served_article
I have a text area in my form which accepts all possible characters from
I have a bunch of posts stored in text files formatted in yaml/textile (from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words

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.