Jar file and documentation are available at https://github.com/jgilfelt/android-sqlite-asset-helper.
It is used to add your database folder in asset folder in your folder hierarchy and use it in your Application.
It is used to add your database folder in asset folder in your folder hierarchy and use it in your Application.
- Add
android-sqlite-asset-helper.jar
tolib
directory. - Copy database in a zip file in
assets/databases/database_name.zip
. - Create class:
public class MyDatabase extends SQLiteAssetHelper { private static final String DATABASE_NAME = "database_name"; private static final int DATABASE_VERSION = 1; public MyDatabase(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } }
No comments:
Post a Comment