If you think the Android project firstcodeandroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.vjia.hellonote;
//www.java2s.comimport android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
publicclass NotesDB extends SQLiteOpenHelper {
publicstaticfinal String TABLE_NAME = "notes";
publicstaticfinal String CONTENT = "content";
publicstaticfinal String PATH = "path";
publicstaticfinal String VIDEO = "video";
publicstaticfinal String ID = "_id";
publicstaticfinal String TIME = "time";
public NotesDB(Context context) {
super(context, "notes", null, 1);
}
@Override
publicvoid onCreate(SQLiteDatabase db) {
db.execSQL("CREATE TABLE " + TABLE_NAME + " (" + ID
+ " INTEGER PRIMARY KEY AUTOINCREMENT," + CONTENT
+ " TEXT NOT NULL," + PATH + " TEXT NOT NULL," + VIDEO
+ " TEXT NOT NULL," + TIME + " TEXT NOT NULL)");
}
@Override
publicvoid onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
}