Search in sources :

Example 1 with DevOpenHelper

use of org.greenrobot.greendao.example.DaoMaster.DevOpenHelper in project greenDAO by greenrobot.

the class App method onCreate.

@Override
public void onCreate() {
    super.onCreate();
    DevOpenHelper helper = new DevOpenHelper(this, ENCRYPTED ? "notes-db-encrypted" : "notes-db");
    Database db = ENCRYPTED ? helper.getEncryptedWritableDb("super-secret") : helper.getWritableDb();
    daoSession = new DaoMaster(db).newSession();
}
Also used : DevOpenHelper(org.greenrobot.greendao.example.DaoMaster.DevOpenHelper) Database(org.greenrobot.greendao.database.Database)

Aggregations

Database (org.greenrobot.greendao.database.Database)1 DevOpenHelper (org.greenrobot.greendao.example.DaoMaster.DevOpenHelper)1