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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:05:05+00:00 2026-05-15T08:05:05+00:00

keeping my question short, I have created an application with 3 activities, where A

  • 0

keeping my question short, I have created an application with 3 activities, where A – list of categories, B – list of items, C – single item. Data displayed in B and C is parsed from online XML. But, if I go through A -> B1 -> C, then back to A and then back to B1, I would like to have its data cached somewhere so I wouldn’t have to request the XML again.

I’m new to Android and Java programming, I’ve googled a lot and still can’t find (or simply do not have an idea where to look) a way to do what I want.

Would storing all received data in main activity A (HashMaps? ContentProviders?) and then passing to B and C (if they get same request that was before) be a good idea?

  • 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-15T08:05:06+00:00Added an answer on May 15, 2026 at 8:05 am

    A simple and fast way to cache information or to keep track of the application state, is to extend the Application as described in this blog post.

    This blog post forgets to add that you have to set your CustomApplication class in the manifest, like:

    <application [...] android:name="CustomApplication">
    

    In my projects I stick to the singleton style via getInstance.

    More resources: this answer, Global Variables in Android Apps and this blog post.

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

Sidebar

Related Questions

Unfortunately, my question is not as simple as keeping track of two windows created
Consider this short python list of dictionaries (first dictionary item is a string, second
I have a PyQt application that reads and writes data files. I am including
Noob Question here. I have created and successfully added an additional Page Layout to
Keeping the GUI responsive while the application does some CPU-heavy processing is one of
I have a habit of keeping my variable usage to a bare minimum. So
Note: This is a follow up to this question . I have a legacy
We have trouble with keeping apart our different configurations. Allow me to explain with
This is sort of a general implementation question. If I have an arbitrarily deep
Git beginner question: I have a small private webproject which is versioned locally with

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.