public class UsherSdk
extends java.lang.Object
UsherSdk Singleton class provides initialization for the Usher SDK. It should only be
initialized once for an application.| Modifier and Type | Class and Description |
|---|---|
static class |
UsherSdk.Configuration
The
UsherSdk.Configuration abstract class wraps various properties related to the
UsherSdk initialization. |
| Modifier and Type | Method and Description |
|---|---|
static UsherSdk |
get()
Returns the
UsherSdk object. |
java.util.Locale |
getLocale()
Returns the
Locale of the app. |
static void |
init(android.app.Application application,
java.lang.String serverUrl,
java.lang.String appId)
Initializes the
UsherSdk object with an application, server URL, and application ID. |
static void |
init(UsherSdk.Configuration configuration)
Initializes the
UsherSdk object with the provided UsherSdk.Configuration. |
boolean |
isDebugLogMode()
Returns the log mode of the app.
|
void |
setDebugLogMode(boolean isDebugLogMode)
Set log mode for the app
|
void |
setLocale(java.util.Locale locale)
Set
Locale for the app |
void |
uploadDeviceNotificationToken(java.lang.String deviceNotificationToken,
CompleteCallback callback)
Returns a
CompleteCallback after uploading the device notification token to the
server. |
public void uploadDeviceNotificationToken(java.lang.String deviceNotificationToken,
CompleteCallback callback)
CompleteCallback after uploading the device notification token to the
server.deviceNotificationToken - the notification token to be uploaded to the servercallback - the callback to receive the result of uploading the device
notification token to the serverpublic static void init(UsherSdk.Configuration configuration)
UsherSdk object with the provided UsherSdk.Configuration. This can be used for some customized settings of
UsherSdk.Configuration.networkConnectionTimeout() and UsherSdk.Configuration.enableTrustOnFirstUse(). See UsherSdk.Configuration.builder(Application) for details.configuration - See UsherSdk.Configurationpublic static void init(android.app.Application application,
java.lang.String serverUrl,
java.lang.String appId)
UsherSdk object with an application, server URL, and application ID.application - the application that the UsherSdk is initialized forserverUrl - the server URL to handle HTTP requestsappId - the identification number of the applicationpublic void setLocale(@Nonnull
java.util.Locale locale)
Locale for the applocale - the Locale to set@Nonnull public java.util.Locale getLocale()
Locale of the app. If not set before, returns Locale.ENGLISHLocale objectpublic void setDebugLogMode(boolean isDebugLogMode)
isDebugLogMode - the log body mode to set.
true if set to log body mode;
false otherwisepublic boolean isDebugLogMode()
true if a user has set debugging log mode;
false otherwise.