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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:45:34+00:00 2026-06-04T15:45:34+00:00

Okay say your using a app, and you opened a new activity and then

  • 0

Okay say your using a app, and you opened a new activity and then opened another, you can end the activity your on by using finish(); and your back one activity, but how can you go back two activities, all the way back to the first one? I know you could use:

Intent savedGameIntent = new Intent(v.getContext(), firstclass.class);
v.getContext().startActivity(savedGameIntent);

But is that the best way to do it?

  • 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-04T15:45:35+00:00Added an answer on June 4, 2026 at 3:45 pm

    Use the flag Intent.FLAG_ACTIVITY_CLEAR_TOP.

      Intent intent = new Intent(this,A.class);
      intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
      startActivity(intent);
    

    From the documentation:

    If set, and the activity being launched is already running in the current task, then instead of launching a new instance of that activity, all of the other activities on top of it will be closed and this Intent will be delivered to the (now on top) old activity as a new Intent.

    So effectively, if you have A -> B -> C, and you intent to A with that flag set, B and C will close.

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

Sidebar

Related Questions

okay so lets say $word = abcdefg@hijk.lmn can i make a new variable only
Okay, I am using a custom tab bar (not a tab based app) but
Okay, so let's say I have a mysql database table with two columns, one
Okay, lets say I am using the sortable function of jQuery UI with the
Okay, I'd like to write a simple C app for Linux (say Ubuntu with
How can I re-use a function? Okay lets say I have this main function
Okay So this doesnt make sense to me.... maybe someone can shed some light.
Okay I have a folder say... http://oldserver.net/file/index.jar How would I be able to protect
Okay, so say i want to find factors of a number a. I know
Okay so my question is this. Say I have a simple C++ code: #include

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.