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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:13:39+00:00 2026-06-01T14:13:39+00:00

SOLVED! My Activity Stack looks like this, excuse the rough diagram! A–>B–>C ‘–>D If

  • 0

SOLVED!

My Activity Stack looks like this, excuse the rough diagram!

A-->B-->C
    '-->D

If I press back button in activity B I go back to A as expected.
However, if I press back button in Activity C or D I go back to A instead of B.
In my mind this could be caused by two things
1)Activity B quits when it opens the intents for C or D
2)the back button is somehow being called twice?

I have looked closely at the click listeners in activity B that start the intents expecting to find a finish() call in there but there isn’t.
I also check the onBackPressed() methods of activites C and D to see if I was manually opening activity A…but I wasn’t.

here’s the onResume method of activity A

protected void onResume() {
        super.onResume();
        screenOn(SCREEN_ON_DURATION);
        mWakeLock.acquire();

    }

here’s the way I’m starting intents C and D

            Bundle info = new Bundle(); 
            info.putString("classId", ""+classId );


            Intent intent = new Intent(Notebook.this, StudentChooser.class);
            intent.putExtras(info); 

            Notebook.this.startActivity(intent);

Can anyone help?

Edit: I discovered finish() in my onUserLeaveHint() that’s what the problem was!

  • 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-01T14:13:41+00:00Added an answer on June 1, 2026 at 2:13 pm
    The reason may be that you are using finish() in your previous activity,For example
    A->B->C
                Intent intent = new Intent(B.this, C.class);
                startActivity(intent);
                finish();
    
    finish() is destroying B activity hence the control is going on activity A on back button
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Solved: Was missing view parameter for postData(), changed to reflect this. I would like
@Solved The two subquestions I have created have been solved (yay for splitting this
SOLVED: This is what was wrong: current.addFolder(folder); (in the final else clause of the
My problem is mostly like this: strange out of memory issue , and I
I solved the problem by adding the declaration of the activity into Manifest. I
I've seen a few examples on here to this problem, but none have solved
I have an Activity MyActivity with a Button MyButton . I want to attach
I want my activity to look like a dialog. Well, I achieved that using
--The anonymous answer is my answer that I solved this issue with.-- I have
This is really frustrating me and none of the other questions solved my problem.

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.