Android Open Source - firstcodeandroid Notes D B

From Project

Back to project page firstcodeandroid.


The source code is released under:

MIT License

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;
//  w  w  w. j a va2s  .  co  m
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class NotesDB extends SQLiteOpenHelper {

  public static final String TABLE_NAME = "notes";
  public static final String CONTENT = "content";
  public static final String PATH = "path";
  public static final String VIDEO = "video";
  public static final String ID = "_id";
  public static final String TIME = "time";

  public NotesDB(Context context) {
    super(context, "notes", null, 1);

  public void onCreate(SQLiteDatabase db) {
    db.execSQL("CREATE TABLE " + TABLE_NAME + " (" + ID
        + " TEXT NOT NULL," + PATH + " TEXT NOT NULL," + VIDEO
        + " TEXT NOT NULL," + TIME + " TEXT NOT NULL)");

  public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {



Java Source Code List