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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:09:46+00:00 2026-06-17T15:09:46+00:00

I have five activity in my app, Act1->Act2->Act3->Act4->Act5, All activity goes in single direction

  • 0

I have five activity in my app,
Act1->Act2->Act3->Act4->Act5,

All activity goes in single direction as I have stated above,
Now I have to call again Act2 after successful completion of my Act5’s task, so its working good and showing me the Act2 (I have Used startActivity(callIntent) in Act5 for showing me Act2 again),
After this when I click on Back button in Act2, I have Act1 (I have Used startActivity(callIntent) in Act2 for showing me Act1 again) its what I want …..
But the problem is that when I click Act1’s back button it is going to put me on Act2. But I want to exit from there, because Act1 is the first initial activity.

How Can I set focus to my hidden activity , instead of creating Intent and call startActivity.

Any idea? Please help.

  • 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-17T15:09:47+00:00Added an answer on June 17, 2026 at 3:09 pm

    After long research I got pretty much understanding of “back stack” for all the activities in an app.

    Each time I moved to another activity and also for opening previous activity I have used Intent.startActivity() with flag FLAG_ACTIVITY_NEW_TASK, So every time I have new activity added in the “back-stack”.

    I have tried intent flag as FLAG_ACTIVITY_CLEAR_TOP while calling previous activity from “back-stack” using Intent.startActivity() and I got the solution of calling back the previous activity and clears all stack top activity above the calling one activity. So now back button does working nice as I needed.

    Let see My problem of calling previous activity ,
    A = activity; A1->A2->A3->A4->A5->B2 , now if you click on back button you will have A1 activity , and after clicking on A1’s back button you have again B2 activity which was called after A5 and so on.

    After using the FLAG_ACTIVITY_CLEAR_TOP in A5 activity and called again A2 (Not creating new activity but calling precious one) I have following situation.

    A = activity; A1->A2->A3->A4->A5
    

    calling previous A2 activity, and I have following scenario.
    A1->A2 only.

    Thanks.

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

Sidebar

Related Questions

i have develop one app in which five activity :: and sixth number activiy
I have Five check boxes Search All Template 1 Template 2 Template 3 Template
I have five SWF files that are loaded into a main SWF. All five
I have five WSDL's that share namespaces, but not all of them. I generate
I have five html pages ,all pages have same search tab,header,footer, my question is
I'm creating an app that has five activities. I have one class with functions
I have five different regular expressions with common parts. All parts with ? at
I have five UIButtons in my application.All these UIButtons are stored in Array.As my
I have develop one app in which four box question are there. all question
I have an activity with five tabs. Everything looks okay when I go from

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.