public static class EvernoteSession.Builder
extends java.lang.Object
EvernoteSession.| Constructor and Description |
|---|
Builder(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
EvernoteSession |
build(java.lang.String consumerKey,
java.lang.String consumerSecret)
Creates a new instance with this consumer key and secret pair.
|
EvernoteSession |
buildForSingleUser(java.lang.String developerToken,
java.lang.String noteStoreUrl)
Creates a session only for your personal account.
|
EvernoteSession.Builder |
setEvernoteService(EvernoteSession.EvernoteService evernoteService)
Default is
EvernoteSession.EvernoteService.SANDBOX. |
EvernoteSession.Builder |
setForceAuthenticationInThirdPartyApp(boolean forceAuthenticationInThirdPartyApp)
Default is
false. |
EvernoteSession.Builder |
setLocale(java.util.Locale locale)
The parameter is used to find the appropriate Evernote server, which can be with
EvernoteSession.EvernoteService.PRODUCTION either EvernoteSession.HOST_PRODUCTION or EvernoteSession.HOST_CHINA. |
EvernoteSession.Builder |
setSupportAppLinkedNotebooks(boolean supportAppLinkedNotebooks)
Default is
true. |
public Builder(android.content.Context context)
context - Any context. The session caches the application context.public EvernoteSession.Builder setEvernoteService(EvernoteSession.EvernoteService evernoteService)
EvernoteSession.EvernoteService.SANDBOX. You need to exchange the value for your
production app.evernoteService - The desired service.public EvernoteSession.Builder setSupportAppLinkedNotebooks(boolean supportAppLinkedNotebooks)
true.supportAppLinkedNotebooks - true if app linked notebooks are supported.public EvernoteSession.Builder setForceAuthenticationInThirdPartyApp(boolean forceAuthenticationInThirdPartyApp)
false.forceAuthenticationInThirdPartyApp - true if the authentication should be
launched in the third party app and not in the
main Evernote app.public EvernoteSession.Builder setLocale(java.util.Locale locale)
EvernoteSession.EvernoteService.PRODUCTION either EvernoteSession.HOST_PRODUCTION or EvernoteSession.HOST_CHINA.
China is only used if the locale is Chinese, e.g. Locale.SIMPLIFIED_CHINESE.
Locale.getDefault().locale - The new locale used the fetch the bootstrap profiles. null is not allowed.public EvernoteSession build(java.lang.String consumerKey, java.lang.String consumerSecret)
consumerKey - Your consumer key.consumerSecret - Your consumer secret.EvernoteSession.asSingleton() to make reuse the session in the SDK.public EvernoteSession buildForSingleUser(java.lang.String developerToken, java.lang.String noteStoreUrl)
developerToken - Your personal developer token.noteStoreUrl - The note store url of your Evernote account.EvernoteSession.asSingleton() to make reuse the session in the SDK.