Created
February 13, 2017 10:49
-
-
Save janishar/679d4ce6d53358eb169b35c4acf55c3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onCreate() { | |
super.onCreate(); | |
mDaoSession = | |
new DaoMaster(new DbOpenHelper(this, "greendao_demo.db").getWritableDb()).newSession(); | |
// USER CREATION FOR DEMO PURPOSE | |
if(mDaoSession.getUserDao().loadAll().size() == 0){ | |
mDaoSession.getUserDao().insert(new User(1L, "Janishar Ali","", "")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment