Back to project page droidkit-engines.
The source code is released under:
MIT License
If you think the Android project droidkit-engines listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.droidkit.engine._internal.sqlite; /*from ww w . j a v a2 s .c o m*/ import android.content.Context; import android.database.sqlite.SQLiteDatabase; public class DbProvider { public static final String DB_NAME = "SECRET_DB"; private static volatile SQLiteDatabase db; public synchronized static SQLiteDatabase getDatabase(final Context context) { if (db == null || !db.isOpen()) { DbHelper helper = new DbHelper(context.getApplicationContext(), DB_NAME, null); db = helper.getWritableDatabase(); } return db; } }