-
public final class UserModule extends BatchModule
Batch User module
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classUserModule.SaveException
-
Field Summary
Fields Modifier and Type Field Description public final static StringTAGpublic final static StringPARAMETER_KEY_LABELpublic final static StringPARAMETER_KEY_DATApublic final static StringPARAMETER_KEY_AMOUNT
-
Method Summary
Modifier and Type Method Description static UserModuleprovide()StringgetId()ID of the module intgetState()Should return the state of the module (usually 0 for deactivated, 1 for activated) voidbatchDidStart()Called by Batch right after batch startNB : Same context and activity that in willStart but with the new state READY set voidstartSendWS(long msDelay)voidstartCheckWS(long msDelay)voidstoreTransactionID(String transactionID, long version)voidbumpVersion(long serverVersion)voidtrackPublicEvent(String event, String label, JSONObject data)Track a public event voidtrackLocation(Location location)voidtrackTransaction(double amount, JSONObject data)static voidsubmitOnApplyQueue(long msDelay, Runnable r)static voidaddUserPendingOperations(List<UserOperation> operations)Add pending operations when save is called before the SDK is started static voidapplyUserOperationsSync(List<UserOperation> pendingOperationQueue)static voidprintDebugInfo()static voidwipeData(Context context)static voiduserOptedIn(Context context)-
-
Method Detail
-
provide
static UserModule provide()
-
getState
int getState()
Should return the state of the module (usually 0 for deactivated, 1 for activated)
-
batchDidStart
void batchDidStart()
Called by Batch right after batch startNB : Same context and activity that in willStart but with the new state READY set
-
startSendWS
void startSendWS(long msDelay)
-
startCheckWS
void startCheckWS(long msDelay)
-
storeTransactionID
void storeTransactionID(String transactionID, long version)
-
bumpVersion
void bumpVersion(long serverVersion)
-
trackPublicEvent
void trackPublicEvent(String event, String label, JSONObject data)
Track a public event
- Parameters:
event- Event namelabel- Event labeldata- Event data, expected to already be converted from BatchEventData.
-
trackLocation
void trackLocation(Location location)
-
trackTransaction
void trackTransaction(double amount, JSONObject data)
-
submitOnApplyQueue
static void submitOnApplyQueue(long msDelay, Runnable r)
-
addUserPendingOperations
static void addUserPendingOperations(List<UserOperation> operations)
Add pending operations when save is called before the SDK is started
-
applyUserOperationsSync
static void applyUserOperationsSync(List<UserOperation> pendingOperationQueue)
-
printDebugInfo
static void printDebugInfo()
-
userOptedIn
static void userOptedIn(Context context)
-
-
-
-