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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:24:59+00:00 2026-05-26T08:24:59+00:00

I intend to start 3 activities in a chain (like from main open Activities

  • 0

I intend to start 3 activities in a chain (like from main open Activities A, B and then C, which will be visible for the user), but I wasn’t able to find some way how to do that in Android. Do not ask me why, I just have to do that for restoring my application state, where is was before.

Thanks for any ideas

Waypoint

Edit:

Ok, I have tried opening activities in For cycle, but they aren’t opened properly. They are chained, but recreated only when I press back button and they display to me. I need some solution which leads to: open A, if A is opened check if needs to open B -> YES, open B, check if needs to open C -> YES, open C, no need to open another activity -> FINISH

  • 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-26T08:25:00+00:00Added an answer on May 26, 2026 at 8:25 am

    Override the onResume-method in each activity. Add the check and the start of the activity there.

    public void onResume() {
      if( condition )
        startActivity( intentForTheNextActivity );
    }
    

    Where condition is whatever condition you might have (in your example if B should be started, C should be started etc.) and intentForTheNextActivity is the intent for the following activity in the chain (e.g. if now in A, the intent is for B etc.).


    I’m having a very hard time understanding exactly what it is you’re trying to do. Sometimes it seems like it’s a chain (A opens B, B opens C and so forth) sometimes it seems you want some random flow (A opens B, B opens A, A opens B, B opens C) – which makes it really hard to give you a specific answer.

    What I can do, is recommend that you read up on the following:

    Activity Lifecycle

    Starting Activities and getting results (in particular the methods startActivityForResult and setResult)

    If you need more help than this – you need to explain yourself better (maybe with a diagram or some sample code of what you have tried so far).

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

Sidebar

Related Questions

I tried using this code to start multiple Activities from a parent activity: for
I would like only to start some applications dynamically with the package name from
I intend notifying the user 60 seconds before the session expires in asp.net. I
I have 3 activities. start / game / finish, I want to go start
Here's the problem. In my app, I have 5 tabs which contains activities. In
I have two Activities, both have an inner class SurfaceView, which has an inner
This is a bit of a general question, but I will give a specific
I'm getting errors upon start of my activities, and i've been unable to find
I have two activities in which I need to pass an object array between
I am using Button in main Activity. When i clicked this button it will

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.