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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:46:29+00:00 2026-05-21T11:46:29+00:00

i am experiencing some issue with my application that I cant figure out how

  • 0

i am experiencing some issue with my application that I cant figure out how to solve. When I start my application, my dashboard activity is launched and some network task is perfomed (download information in background). Then, I hit the news button and I am taken to the news activity, where I again download information in background to populate my list view with the latest news. To launch the activity news I use the following code:

public void onNewsClick(View v) {
    startActivity(new Intent(this, NewsActivity.class));
}

Inside the news activity I have an action bar with a home button, where the user should press to get back to the dashboard. If I hit the android back button, the dashboad opens ok and the data the was downloaded the first time the dashboard was launched is not downloaded again (expected scenario). However, if I hit the home button, the dashboard opens and the data is downloaded again. The home button dispach the following code when pressed:

public static Intent createIntent(Context context) {
    Intent i = new Intent(context, DashboardActivity.class);
    i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    return i;
}

I would expect the dashboard to not download the data again if the home button is pressed. Furthermore, If I start the news activity again, the list of latest news will be downloaded again, which is causing a lot of traffic and i dont want it.

So I have two questions:
1. How can I take the user back to the dashboard whithout loading the data again?
2. How can I go back a secont time to my news activity whithout loading the list again?

Many thanks for any answer!
T

  • 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-21T11:46:30+00:00Added an answer on May 21, 2026 at 11:46 am

    1.) Try adding

    i.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
    

    to you intent. As it is, your dashboard activity is getting finished and then recreated. This will ensure your dashboard activity is brought to the top if it is already running and not recreate it.

    2.) Adding this flag to your NewsActivity intent will allow you to not have to reload the NewsActivity if you back out to the dashboard through the action bar home button.

    Edit

    Adding this to your Dashboard Activity will ensure the application is exited when back is pressed.

    @Override
        public void onBackPressed() {
            moveTaskToBack(true);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am experiencing an issue with activity indicator freezing when I move application to
we have a customer that's been experiencing some blocking issues with our database application.
Some colleagues of mine are experiencing the following weird issue, with an MVC2 application
I have some HTML that gets rendered and I'm experiencing an issue with Chrome
Some reasons i am experiencing this issue on my website. When the website loads
I'm using the SocketServer module for a TCP server. I'm experiencing some issue here
My MySQL application is experiencing slow performance when running some UPDATE , INSERT and
Our web application has version numbers that get served out to the client on
I have an XP client that is experiencing an issue. My dev box is
I'm experiencing some issues with application freezes. It looks like it has something to

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.