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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:07:35+00:00 2026-06-07T08:07:35+00:00

Lets say you have one main activity called main, and other sub-activities that do

  • 0

Lets say you have one main activity called “main”, and other sub-activities that do some work and then return some data. Each time main gets called it starts up the sub-activities one at a time.

Main:

onCreate...{

Intent i1 = new Intent("com.bla.bla.activity1");
startActivity(i1);

//Get bundles from activity1 and save some variables..

Intent i2 = new Intent("com.bla.bla.activity2");
startActivity(i2);

//Get bundles from activity2 and save some variables..

Intent i3 = new Intent("com.bla.bla.activity3");
startActivity(i2);

//Get bundles from activity1 and save some variables..
}

If I understand correctly, activity1 will be created at first, and then destroyed. Will the code resume and start activity2 or will it just start activity1 again because the main activity was paused and then resumed (assuming we don’t add an onResume/onPause etc..)?

Edit:

Lets say these sub-activities return one string each, and each string should be saved in one individual column of an SQL entry at the end of the main activity. The main activity should collect the three strings, save it as en entry and the destroy itself.
For this to work, the main activity has to resume for example at intent “i2” after intent “i1” has done some work and returned the string.
How is this result best achieved?

  • 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-07T08:07:37+00:00Added an answer on June 7, 2026 at 8:07 am

    Like Alex said, you wouldn’t want to do that. You want to use the different Intents to call different Activities to create a flow to your program. Main might lead to Activity 1, Activity 1 leads to 2, 3, or 4. If you have several activities, you can use a switch statement to determine which activity you want to launch, based on conditions that are, or are not, met.

    Hope this helps.

    EDIT Answer:

    If you want to save variables from different Activities, the you would want to start the second Activity from the first, the third, from the second, and so on. To create the data for the database, you can simply create an object, and then pass that object from Activity to Activity, using the Parcelable interface. Within each of your Activities you would want to use methods to save the returned data to the database, as you see fit.

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

Sidebar

Related Questions

Lets say I have one table called REVIEWS This table has Reviews that customers
I have two forms,one is main and other is inherited form main.Lets say I
Lets say I have one row with three columns - some buttons on left
Lets say that I have one component which is doing something with Workbook object
Lets say that we have a query like this one: SELECT *, (CUSTOM_EXPRESSION) as
Lets say I have a class that is supposed to generate some ID (for
I have 2 activities lets say A and B. In the first one(A) I
Let's say I have two tables one called Customers and one called CustomerAddresses. Then
My situation is following. I have one Activity that contains three main parts. At
lets say I have some global var GLOBAL in main.c, but my main.c has

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.