android - Storing App Information -
i have been looking @ different ways hold onto predefined character data, having hard time nailing down best solution.
an example of data 10 strings, 5 int arrays (of size 10 each). there 10+ set's of data. application load in information , inflate generic "character" objects.
possible solutions:
xml: due android's structured xml requirements can hard use without making different xml file every character, , have id overlapping similar named data values.
sqlite: wouldn't huge database, databases ugly version controlled unless done create-database script has own downsides (such making sure db date between builds).
hard-coded objects: far least favorite solution, using polymorphism hardcode of objects. dirty, not dynamic should be.
i consider things such version controlling files, ease of updating (due them being inflated, never changed app).
if data baked suggest use harcoded data. reasons.
in 3 solution save data in application.
if use xml-data, have consume time while code parsing inside code. , have write code parses xml.
if use sqlite, data doubled because of have store database in
raw
orassest
directory, copied in/data/data
folder. futhermore, if use strings , sqlite default data doubled again (due utf-16 encoding).
if think, if manage data more usefull store directly inside code. obviously, if not use tons of content:)
Comments
Post a Comment