public class Usher
extends java.lang.Object
Usher class is the entrance to the MicroStrategy Badge SDK. The MicroStrategy Badge
SDK provides a simplified API with a lot of flexibility. You can build and utilize powerful
features without worrying about the details behind the scene. There are two methods of
initialization: standard and custom.
To proceed with a standard initialization, call init(Application, String) and provide
the Application class of your app as well as the server URL. You will use the default
settings of the MicroStrategy Badge SDK.
To proceed with a custom initialization, call init(Configuration). The
Usher.Configuration class offers a more customizable and detailed configuration of the SDK for
your app.
| Modifier and Type | Class and Description |
|---|---|
static class |
Usher.Configuration
The
Usher.Configuration abstract class offers a highly customizable object to configure the
SDK with. |
| Modifier and Type | Method and Description |
|---|---|
retrofit2.Retrofit |
build()
Build the generic network
Retrofit API request with the configured server, which will handle all
authorization requirement and so on. |
retrofit2.Retrofit |
build(retrofit2.converter.gson.GsonConverterFactory gsonConverterFactory)
Build the generic network
Retrofit API request with the configured server, which will handle all
authorization requirement and so on. |
static Usher |
get()
get the singleton of
Usher instance. |
static void |
init(android.app.Application application,
java.lang.String serverUrl)
Initialize the SDK with the
Application and your own server URL. |
static void |
init(Usher.Configuration configuration)
Initialize the SDK with the
Application and your own server URL. |
public static Usher get()
Usher instance.Usher instancepublic static void init(Usher.Configuration configuration)
Application and your own server URL. Use this method
to perform a custom initialization. It should not be called if
init(Application, String) is called.configuration - the detailed Usher.Configuration object that can be configured
as neededpublic static void init(android.app.Application application,
java.lang.String serverUrl)
Application and your own server URL. Use this method
to perform a standard initialization and use the default settings of the MicroStrategy
Badge SDK. It should not be called if init(Configuration) is called.application - the Application class of your appserverUrl - the server URL that you want to configure the SDK withpublic retrofit2.Retrofit build()
Retrofit API request with the configured server, which will handle all
authorization requirement and so on.Retrofit instance to create your own generic network Retrofit
API request.public retrofit2.Retrofit build(@Nullable
retrofit2.converter.gson.GsonConverterFactory gsonConverterFactory)
Retrofit API request with the configured server, which will handle all
authorization requirement and so on.gsonConverterFactory - the gson converter factory to parse the gson data returned from
server. It could be null.Retrofit instance to create your own generic network Retrofit
API request.