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.

  1. in 3 solution save data in application.

  2. if use xml-data, have consume time while code parsing inside code. , have write code parses xml.

  3. if use sqlite, data doubled because of have store database in raw or assest 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

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -