Back to project page GeoTasker.
The source code is released under:
GNU General Public License
If you think the Android project GeoTasker 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.fjaviermo.database; /*from w w w .j a v a 2s . com*/ import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; public class DatabaseHelper extends SQLiteOpenHelper { private static final String DATABASE_NAME = "geotasker.db"; private static final int DATABASE_VERSION = 1; public DatabaseHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase database) { if (!database.isReadOnly()) { // Enable foreign key constraints database.execSQL("PRAGMA foreign_keys = ON;"); Log.i("TAG", "FOREIGN KEY constraint enabled!"); } ProfilesSQLiteHelper.onCreate(database); LocationSQLiteHelper.onCreate(database); } @Override public void onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion) { ProfilesSQLiteHelper.onUpgrade(database, oldVersion, newVersion); LocationSQLiteHelper.onUpgrade(database, oldVersion, newVersion); } }