just a quick look at the docs for Greendao reveals:
Now have a look at the addNote method, how you insert a new note in the database:
Note note = new Note(null, noteText, comment, new Date());
noteDao.insert(note);
Log.d("DaoExample", "Inserted new note, ID: " + note.getId());
Just create a Java object and call insert on the DAO. When the insert method returns, the database id of the just inserted note is already assigned to the object, as you can see in the log statment.
looks like null
is the answer you want.