ZumoKit
public class ZumoKit
public interface User
The entry point of the ZumoKit SDK.
Obtain an instance of this class by calling its constructor. Your ZumoKit account manager will provide you with API key.
Then, proceed to sign in a user with call to auth method. If sign in is succesful AuthCallback's onSuccess handler will be called with User instance, otherwise onError handler is called with error details.
Call getState to get current SDK state. Register state listner with addStateListener. Unregister listener with removeStateListener.
Additionaly, retrieve an instance of Utils class by calling utils.
Public Constructor Summary
public ZumoKit(String txServiceUrl, String apiKey, String apiRoot, String myRoot))
Public Method Summary
Type | Method |
---|---|
void | addStateListener(StateListener listener) Attach listener called when there is a change to ZumoKit state. |
void | auth(String userToken, HashMap<String, String> headers, AuthCallback callback) Authenticate user with ZumoKit. |
State | getState() Returns current ZumoKit state. |
static String | getVersion() Returns current ZumoKit SDK version. |
Utils | utils() Returns ZumoKit SDK utility class Utils. |
void | removeStateListener(StateListener listener) Remove StateListener. |
Public Constructor
public ZumoKit(String txServiceUrl, String apiKey, String apiRoot, String myRoot)
Your ZumoKit account manager will provide you with API key. See Getting Started for details.
Public Methods
addStateListener
void addStateListener(StateListener listener)
Attach listener called when there is a change to ZumoKit state.
auth
void auth(String userToken, HashMap<String, String> headers, AuthCallback callback)
Authenticate user with ZumoKit. See Getting Started for details.
If sign in is succesful AuthCallback's onSuccess handler will be called with User instance, otherwise onError handler is called with error details.
getState
State getState()
Returns current ZumoKit state. See State for available properties.
getVersion
static String getVersion()
Returns current ZumoKit SDK version.
utils
Utils utils()
Returns ZumoKit SDK utility class Utils.
removeStateListener
void removeStateListener(StateListener listener)
Remove StateListener.