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

The Archive Base Latest Questions

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

In my navigation the following sequence of activities can be produced: A,B,C,B,C,B,C, …, D.

  • 0

In my navigation the following sequence of activities can be produced: A,B,C,B,C,B,C, …, D.
D activity contains an overriden method for the Back-button, which sends user to the A activity with Intent.FLAG_ACTIVITY_CLEAR_TOP parameter.

Activity A receives a number of necessary extra parameters and my problem is that when I trigger startActivity in D activity with this CLEAR_TOP flag activity A doesn’t seem to get any previous extra or even launch onResume method.

Does it mean that CLEAR_TOP actually recreates the target activity instead of bringing up the old one ? And, is there any system-natural approach to restore those extra intent parameters in activity A when I launch it from activity D.

P.S. Right now the only choice I see is to manually fillin those previous necessary parameters when constructing intent object in D activity. Is it a way to go ?

Thanks.

  • 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-07T16:06:35+00:00Added an answer on June 7, 2026 at 4:06 pm

    Does it mean that CLEAR_TOP actually recreates the target activity
    instead of bringing up the old one ?

    When you use CLEAR_TOP flag,target Activity does not recreate,but when you use a new intent to appear Activity A,you can only get this new intent’s extras in Activity A.

    And, is there any system-natural approach to restore those extra
    intent parameters in activity A when I launch it from activity D?

    You can save these extras in file,preferences or global application variables,when you leave Activity A.Or you can declare a static method in Activity A that save these extras in it and you would to invoke it from Activity D,before force to appear Activity A:
    Activity A:

    Public class A extends Activity{
    ...
    public static void saveExtras(){
    //save extras in file,preferences,...
    }
    ...
    }     
    

    Activity D:

    Public class D extends Activity{
    ...
    public void forceActivityA(){
    A.saveExtras();
    Intent i = new Intent(this,A.class());
    ...
    startActivity(i);
    }
    ...
    } 
    

    Edit:
    When Activity A appears again,it’s onCreate() method invokes again and here you can get intent that request it.Then you can get intent’s flag and compare it with 67108864(constant for CLEAR_TOP flag).If it equals to this constant you would to retrieve your data from your storage(file,preferences,…).To create global variables you can see this question.

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

Sidebar

Related Questions

Let's assume a simple application, which has at the top the following navigation (pseudo
The following attempts to make a navigation button and animate it, however I think
I have following code which add BackButton on my view's navigation item's tabbar. It
I have following navigation structure, which i want to implement in wordpress: (Home /
I have the following setup: testBean.java with a method public String getResult() , which
I have the following script which animates a background image sprite on my navigation
I want to achieve the following hierarchical navigation model in a WPF MVVM application:
My navigation panel currently has the following attributes: <div id='navpanel' style='float:left; width:300px; height:100%; overflow:hidden;
In the following implementation of a hypothetical navigation module the module object returns properties
I have the following function (from the opensource project recast navigation ): /// Derives

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.