vitvikt wrote: > Now I want only translate to Android those applications, which work > now in WindowsCE, Palm and Symbian mobiles. All of them use dictionary > about 1Mb. > May be in this case it’s better to save data in SQLite database, but > question is remain. > What techniqes can we use for data saving?
Your dictionary should be in persistent storage: raw resource, XML resource, application-local file (e.g., openFileInput()), SD card, SQLite database. And, if possible, to minimize your memory footprint, try not to load the whole block of data into RAM at one time. If your dictionary is for lookup purposes (e.g., user types in a word, you show a definition), SQLite would seem to be a good choice. If your dictionary is for spell-checking, I'm guessing that perhaps you *will* need to load that all in memory for speed. However, in that case, I'd store it in an instance variable in your activity (vs. a static variable), and reload your data on every onCreate()/onNewIntent() call of relevance. > I hope that, if my application will be killed off by Android, I got > null for my static array and I shall read my file ago. Use an instance variable on the activity, and you won't have this question. If you call finish() in your activity (e.g., on a "Close" option menu choice), that will terminate your activity, and the next time you start it, you will go through onCreate() and will need to re-load your data file. -- Mark Murphy (a Commons Guy) http://commonsware.com The Busy Coder's Guide to Android Development -- coming in June 2008! --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---