> Basically, saving off a database from the emulator and blowing it up > as a raw at runtime seems to work. Just create the database and store > it on the emulator. Then use "adb pull" to pull the database from the > emulator onto your desktop. Drop this .db in your project resources/ > raw directory.
Note that your technique should also work for SQLite databases created outside of the emulator. So long as you are running the same major release of SQLite, the file format will be the same. Hence, if you want to use some desktop tools to create the SQLite file you are "baking into" your APK as a raw resource, that should be fine. Also, bear in mind that you are now taking up ~1.5 times the amount of on-board flash space -- you have your full-size uncompressed copy, plus the original compressed one. There is no way to get rid of the raw resource after you are done with it. For small databases, this is not an issue, but I would not pack a large database in this way (e.g., 15MB). Finally, others have reported errors when attempting to expand large files out of the APK. I think the limit was 1MB or 2MB. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

