Search code examples
androidlistviewserializationandroid-contentprovider

Saving Populated Listview Items on disk and reloading them when App is launched


In my android application, I have a list view. Each list view item has some text and text and a bitmap. This list is population with content from my back-end each time I start the app.

What I want to do is to save the these populated items onto disk when app is closed, and reload them when app is started next time from the disk. The list can be further populated from back-end. (just like facebook does)

How do I achieve this ? People generally suggest two ways to do this:

  • Content Provider and sqlite-db
  • Object caching and serialization.

I want to understand what is more appropriate way for the task ? I would appreciate any links/ tuts or code snippets to demonstrate the concept.


Solution

  • I will post my solution.

    I found a package that provided kinda middle ground: Easy functionality and simple retrieval: www.rushorm.com

    It allows for queries too, as well as storage of bitmaps and large texts.