在android中,使用SearchNotes.java示例和一个非常简单的添加来自我:
Log.d("something", title + " "+ note.getUpdated() + " "+ note.getNotebookGuid());
Api仅返回0或null!我错过了什么吗?
代码上下文的更多细节:
try{
mEvernoteSession.getClientFactory().createNoteStoreClient()
.findNotesMetadata(filter, offset, pageSize, spec, new OnClientCallback<NotesMetadataList>() {
@Override
public void onSuccess(NotesMetadataList data) {
Toast.makeText(getApplicationContext(), R.string.notes_searched, Toast.LENGTH_LONG).show();
removeDialog(DIALOG_PROGRESS);
for(NoteMetadata note : data.getNotes()) {
String title = note.getTitle();
notesNames.add(title);
Log.d("something", title + " "+ note.getUpdated() + " "+ note.getNotebookGuid());
}
答案 0 :(得分:0)
当您致电NoteStore#findNotesMetadata
时,您可以使用NotesMetadetaResultSpec
指定返回的内容。
http://dev.evernote.com/documentation/reference/NoteStore.html#Fn_NoteStore_findNotesMetadata
http://dev.evernote.com/documentation/reference/NoteStore.html#Struct_NotesMetadataResultSpec
确保将includeUpdated
和includeNotebookGuid
设置为true
。