public class UsherCodeManager
extends java.lang.Object
implements android.arch.lifecycle.LifecycleObserver
UsherCodeManager class collects all of the use cases related to the MicroStrategy
Badge code, including request and validation. The Badge code is a dynamic identification number
that users can use to validate the identities of others using the MicroStrategy Badge app. All of
these methods will be executed on a background thread and will return the result on the main
thread. To receive the result, a SingleCallback must be provided.| Constructor and Description |
|---|
UsherCodeManager(android.support.v7.app.AppCompatActivity appCompatActivity)
Constructor for an
UsherCodeManager object with the lifecycle set. |
UsherCodeManager(android.support.v4.app.Fragment fragment)
Constructor for an
UsherCodeManager object with the lifecycle set. |
UsherCodeManager(android.arch.lifecycle.Lifecycle lifecycle)
Constructor for an
UsherCodeManager object with the lifecycle set. |
| Modifier and Type | Method and Description |
|---|---|
void |
get(int badgeId,
SingleCallback<UsherCodeEntity> callback)
Returns an
UsherCodeEntity object that wraps the core attributes pertaining to the
Badge code, a dynamic identification number that users can use to validate the identities of
others using the MicroStrategy Badge app, or the time-based one-time password (TOTP). |
void |
validate(java.lang.String usherCode,
int badgeId,
SingleCallback<BadgeEntity> callback)
Returns a
BadgeEntity object after validating a Badge code. |
public UsherCodeManager(android.arch.lifecycle.Lifecycle lifecycle)
UsherCodeManager object with the lifecycle set.lifecycle - See Lifecyclepublic UsherCodeManager(android.support.v7.app.AppCompatActivity appCompatActivity)
UsherCodeManager object with the lifecycle set.appCompatActivity - See AppCompatActivitypublic UsherCodeManager(android.support.v4.app.Fragment fragment)
UsherCodeManager object with the lifecycle set.fragment - See Fragmentpublic void get(int badgeId,
SingleCallback<UsherCodeEntity> callback)
UsherCodeEntity object that wraps the core attributes pertaining to the
Badge code, a dynamic identification number that users can use to validate the identities of
others using the MicroStrategy Badge app, or the time-based one-time password (TOTP).badgeId - the identification number of the badgecallback - the callback to receive the UsherCodeEntity objectpublic void validate(java.lang.String usherCode,
int badgeId,
SingleCallback<BadgeEntity> callback)
BadgeEntity object after validating a Badge code.usherCode - the Badge codebadgeId - the identification number of the badgecallback - the callback to receive the BadgeEntity object. Will throw a
DomainException if the Badge code is invalid