How to retrieve getUpdated or getNotebookGuid information in evernote api

StackOverflow https://stackoverflow.com/questions/17081042

  •  31-05-2022
  •  | 
  •  

Вопрос

In android, with SearchNotes.java example and a very simple add from me:

Log.d("something", title + " "+ note.getUpdated() + " "+ note.getNotebookGuid());

Api returns only 0 or null! Did I missed something?

More details of the context of the code:

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());
                            }
Это было полезно?

Решение

When you call NoteStore#findNotesMetadata, you can specify what it returns with NotesMetadetaResultSpec. http://dev.evernote.com/documentation/reference/NoteStore.html#Fn_NoteStore_findNotesMetadata http://dev.evernote.com/documentation/reference/NoteStore.html#Struct_NotesMetadataResultSpec

Make sure you set includeUpdated and includeNotebookGuid to true.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top