android bestway to keep temp data
hi in my application i have temp data , i need to keep th开发者_运维百科e data only up to a particular condition , when app meet this condition,i don't need the data anymore. my problem how to keep the data,upon resuming the application
Using shared preference is the best way
You could try storing data in a sqlite database - there are lots of examples around the internet about how you can use sqlite database in an android application :
http://developer.android.com/guide/topics/data/data-storage.html
http://www.screaming-penguin.com/node/7742
or, you could store stuff in xml files
http://www.ibm.com/developerworks/opensource/library/x-android/
if you store data in xml or an sqlite database - the data is persistent until you specifically remove it.
精彩评论