Monday, July 12, 2010

[android-developers] Approach to cache large amount of Textual and audio data in Android application

Hi:

We are supposed to cache textual and audio data in our application
until device is booted or maximum of two days, whichever happens
earlier. To get a perspective on data to be cached, note that we are
to store about 200 text headers containing around 10 fields, each of
length 30 bytes and about 20 sound files each about a minute long.

We are getting the textual data by parsing XMLs and then we keep them
in ArrayLists. The sound files are directly written inside the app
storage using File I/O (and not on SDcard or Apps Cache directory).

This application is to be run on devices running Android 1.5 or later.

I understand, and please correct me if I am wrong, that we can cache
the files either on SDcard or inside the application or inside
applications Cache directory.


I have the following questions regarding how do we approach Caching?

1. Should we persist the textual data in applications SQLite database
or should we use Java Serialization mechanism and persist the List
objects(which constitute Serializable components) inside the
application?
2. Where should we write the text data /sound files - inside
application, cache or SD card?
3. Can all of these be saved to applications cache directory? How big
can the cache directory grow?
4. Can we specify a time span to Android Runtime for which a cache is
maintained? Or would we have to do this manually?

Please help and advise.

Thanks.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate