Android Open Source - Note Note Application






From Project

Back to project page Note.

License

The source code is released under:

MIT License

If you think the Android project Note 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 org.bq.app;
//from ww  w  . j av  a 2 s  .c o  m
import org.bq.db.DaoMaster;
import org.bq.db.DaoSession;

import android.app.Application;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

public class NoteApplication extends Application {
  public static Context applicationContext;
  private static NoteApplication instance;
  /**
   * ?????greenDao?????????????
   */
  public static DaoSession daoSession;
  private static SQLiteDatabase database;

  @Override
  public void onCreate() {
    super.onCreate();
    applicationContext = this;
    instance = this;

    database = new DaoMaster.DevOpenHelper(this, "notes-db", null)
        .getWritableDatabase();
    DaoMaster daoMaster = new DaoMaster(database);
    daoSession = daoMaster.newSession();
  }

  public static NoteApplication getInstance() {
    return instance;
  }

  public static SQLiteDatabase getDB() {
    return database;
  }
}




Java Source Code List

com.bq.note.NoteActivity.java
com.bq.note.NoteAdapter.java
com.bq.note.NoteEditActivity.java
com.bq.note.NotesListItem.java
com.bq.widget.NoteWidgetProvider_4x.java
com.bq.widget.NoteWidgetProvider.java
org.bq.app.NoteApplication.java
org.bq.db.DaoMaster.java
org.bq.db.DaoSession.java
org.bq.db.NoteDao.java
org.bq.db.Note.java
org.bq.tool.ResourceParser.java