thanx Kostya for the support and sorry for late reply, Actually, data is going to be changed frequently, and i am also confused that whether i should implement Database or File ?? pls show me a way to my problem as i have stated above (data is going to be changed frequently).
On Nov 12, 8:27 pm, Kostya Vasilyev <[email protected]> wrote: > Paresh, > > There are a couple options, depending on how large the data is, how > quickly it changes, and how important it is to completely avoid > unnecessary reloads: > > 1 - Use SQLiteDatabase or SharedPreferences. > > This is truly persistent, and will survive the death/resurrection of not > just the Activity, but of the process as well, and even the phone being > rebooted. > > 2 - Keep an in-memory data structure (a Java singleton should work well). > > This will survive activity lifecycle, but will go away when the process > does. However, this may not happen immediately after the user leaves the > activity, so there is still value here. > > -- Kostya > > 12.11.2010 16:05, paresh mayani пишет: > > > > > Hello all, > > > Actually, i am fetching XML from the web, parsing it and display it on > > the screen. The problem which i am getting is that the activity tries > > to load the data from web each time the activity is called.(Actually, > > my mobile app requires frequent trips to the server) So i am in search > > of the below solution: > > > On Re-launch of an activity, the data from web should not be loaded > > again. (But it should load data from the cache or local database that > > we have created while calling the web-xml for the first time). > > creating a class that i can use to transparently make application > > faster by > > selectively caching items in memory. And thus, making users very > > happy and > > This class can even apply individual refresh times to each cached > > item. > > > So, i think i need to store the data in Cache , or in local database > > or something like that. > > > Is there any way/technique to implement such thing ? so that it need > > not to load from web every-time on Re-launch of an activity. > > > [Note: I want to do to make client happy by decreasing the loading > > time and running the application efficiently and optimizing > > application's loading time] > > -- > Kostya Vasilyev -- WiFi Manager + pretty widget > --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

