Back to project page donatello-y-raphael.
The source code is released under:
MIT License
If you think the Android project donatello-y-raphael 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.example.ATracePath; //from w w w . j ava 2 s. c o m import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; /** * Created by ranrath on 22/09/14. */ public class DbHelper extends SQLiteOpenHelper { public static final String DB_NAME = "FLOWTMNT_DB"; public static final int DB_VERSION = 1; public static final String TableProgress = "progress"; public static final String[] TableProgressColumns = { "_id", "puzzleID", "packID", "challengeID", "finished" }; private static final String sqlCreateTableStudent = "CREATE TABLE progress(" + " _id INTEGER PRIMARY KEY AUTOINCREMENT," + " puzzleID INTEGER NOT NULL," + " packID INTEGER NOT NULL," + " challengeID INTEGER NOT NULL," + " finished BOOLEAN" + ");"; private static final String sqlDropTableStudents = "DROP TABLE IF EXISTS progress;"; public DbHelper( Context context ) { super( context, DB_NAME, null, DB_VERSION ); } @Override public void onCreate(SQLiteDatabase db) { db.execSQL( sqlCreateTableStudent ); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL( sqlDropTableStudents ); onCreate( db ); } }