Android Open Source - Note Note Application

From Project

Back to project page Note.


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

//from ww  w  . j av  a 2 s  .c o  m

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;

  public void onCreate() {
    applicationContext = this;
    instance = this;

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

  public static NoteApplication getInstance() {
    return instance;

  public static SQLiteDatabase getDB() {
    return database;

Java Source Code List