Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Listing notebooks using the AsynNoteStoreClient
//Creating the business note store makes network requests
//to validate the auth token for the business
mEvernoteSession.getClientFactory().createBusinessNoteStoreClient(
new OnClientCallback<AsyncBusinessNoteStoreClient>() {
@Override
public void onSuccess(final AsyncBusinessNoteStoreClient client) {
//This is running in the UI Thread
client.listNotebooks(new OnClientCallback<List<Notebook>() {
@Override
public void onSuccess(final List<Notebook> notebooks) {
//This is running in the UI Thread
Log.d(LOGTAG, "Notebook count="notebooks.size());
}
@Override
public void onException(Exception exception) {
//This is running in the UI Thread
Log.e(LOGTAG, "Error listing notebooks", exception);
}
}
});
@Override
public void onException(Exception exception) {
Log.e(LOGTAG, "Error create business note store", exception);
}
});
ClientFactory clientFactory = mEvernoteSession.getClientFactory()
.getNoteStoreClient();
client.listNotebooks(new OnClientCallback<List<Notebook>() {
@Override
public void onSuccess(final List<Notebook> notebooks) {
//This is running in the UI Thread
Log.d(LOGTAG, "Notebook count="notebooks.size());
}
@Override
public void onException(Exception exception) {
//This is running in the UI Thread
Log.e(LOGTAG, "Error listing notebooks", exception);
}
});
<dependency>
<groupId>com.evernote</groupId>
<artifactId>android-sdk</artifactId>
<version>1.1</version>
<type>apklib</type>
</dependency>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.