Android SQLiteAssetHelper

An Android helper class to manage database creation and version management using an application's raw asset files

View the Project on GitHub jgilfelt/android-sqlite-asset-helper

An Android helper class to manage database creation and version management using an application's raw asset files.

This class provides developers with a simple way to ship their Android app with an existing SQLite database (which may be pre-populated with data) and to manage its initial creation and any upgrades required with subsequent version releases.

It is implemented as an extension to SQLiteOpenHelper, providing an efficient way for ContentProvider implementations to defer opening and upgrading the database until first use.

Rather than implementing onCreate() and onUpgrade() methods to execute a bunch of SQL statements, developers simply include appropriately named file assets in their project's assets directory. These will include the initial SQLite database file for creation and optionally any SQL upgrade scripts.

Credits

Author: Jeff Gilfelt

The code in this project is licensed under the Apache Software License 2.0.

Copyright (c) 2012 readyState Software Ltd.