Android SQLite preload database over 1 MB

Android only support 1 MB file size for asset. So, we can’t use preloaded database. If we want to use , we need to split database file. You can tutorial from http://androidsnips.blogspot.sg/2010/10/copying-larger-database-files-in.html . So, I tweeted about this problem on twitter and I got the reply from Ye Myat Min . Yes, we can use with mp3 file extension instead of .sqlite or .db .

 

I tried with mydb.mp3 . I can access sqlite database from android. My database have over 200 MB . Need to wait a bit time when installing . It’s good for development. For production , I recommend to use split method. Because split method , compress the file and your apk file size will be small. No compress method , apk file size have over 200 MB. However, I use split method, it only have around 100 MB. So, for production use split instead of .mp3 for no compress.
 
For , How to use pre loaded sqlite database with android
 
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
comments powered byDisqus