Good way to cache data during Android application lifecycle?
        Posted  
        
            by sniurkst
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by sniurkst
        
        
        
        Published on 2010-04-20T15:15:21Z
        Indexed on 
            2010/04/20
            18:43 UTC
        
        
        Read the original article
        Hit count: 348
        
Hello,
keeping my question short, I have creating 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 trough A -> B1 -> C, then back to A and then back to B1 I would like to have it's data cached somewhere so I wouldn't have to request 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?
© Stack Overflow or respective owner