Using hashtable or SQL Lite in my android application -



Using hashtable or SQL Lite in my android application -

initially utilize hashtable in android application. key point love hashtable is able store complex item such as: coordinate-->float[2], velocity-->float[2].

but many samples, using sqllite table in android seems more efficient may store values in 1 row defined rowid.

so can enlighten me on problem? using hash table or sql lite more feasible? can hashtable maintain info if exit application?

can hashtable maintain info if exit application?

no, of course of study no. hashtable instance live while app running, close app, deleted. now, set hand in heart , reply these questions:

how much info have save? how utilize data? how long should info persist?

that said, let's talk more ways persist data:

shared preferences if want easy way persist simple info structures, way go. in fact, shared preferences allows save info in key<->value schema similar hashtable. sqlite method useful, though it's not necessary if not saving complex info structures. if want save values, using sqlite killing fly cannon. there more ways persist info think not applicable want do.

so, @ first glance, suggest take @ examples of shared preferences, seems ideal scenario.

android hashtable sqlite

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -