Back to project page Freebloks-Android.
The source code is released under:
GNU General Public License
If you think the Android project Freebloks-Android 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 de.saschahlusiak.freebloks.database; // w w w . ja va 2s. c om import android.content.Context; import android.database.sqlite.SQLiteDatabase; public abstract class FreebloksDB { Context context; SQLiteDatabase db; FreebloksDBOpenHandler dbHelper; public FreebloksDB(Context context) { this.context = context; } public boolean open() { db = null; dbHelper = new FreebloksDBOpenHandler(context); try { db = dbHelper.getWritableDatabase(); } catch (Exception e) { e.printStackTrace(); return false; } return (db != null); } public void close() { dbHelper.close(); } public void beginTransaction() { db.beginTransaction(); } public void endTransaction(boolean success) { if (success) db.setTransactionSuccessful(); db.endTransaction(); } }