Created
March 14, 2013 23:58
-
-
Save evernotegists/5166377 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public void createNote(String title, String content) throws TTransportException { | |
| if (mEvernoteSession.isLoggedIn()) { | |
| Note note = new Note(); | |
| note.setTitle(title); | |
| note.setContent(EvernoteUtil.NOTE_PREFIX + content + EvernoteUtil.NOTE_SUFFIX); | |
| mEvernoteSession.getClientFactory().createNoteStoreClient().createNote(note, new OnClientCallback<Note>() { | |
| @Override | |
| public void onSuccess(final Note data) { | |
| Toast.makeText(getApplicationContext(), data.getTitle() + " has been created", Toast.LENGTH_LONG).show(); | |
| } | |
| @Override | |
| public void onException(Exception exception) { | |
| Log.e(LOGTAG, "Error creating note", exception); | |
| } | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment