-
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_DATA
-
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 voidsetLanguage(@NonNull() Context context, @Nullable() String language)Set the new language StringgetLanguage(@NonNull() Context context)Get the User's language voidsetRegion(@NonNull() Context context, @Nullable() String region)Set the User's region StringgetRegion(@NonNull() Context context)Get the User's region voidsetCustomID(@NonNull() Context context, @Nullable() String customID)Set the User's custom identifier StringgetCustomID(@NonNull() Context context)Get the custom ID if any, null otherwise longgetVersion(@NonNull() Context context)Get the data version synchronized voidincrementVersion(@NonNull() Context context)Get the data version and increment it voidclearInstallationData()Clear all installation data (attributes + tags) voidstartSendWS(long msDelay)voidstartCheckWS(long msDelay)voidstoreTransactionID(String transactionID, long version)voidbumpVersion(long serverVersion)voidtrackLocation(Location location)static voidsubmitOnApplyQueue(long msDelay, Runnable r)voidaddOperationQueueAndSubmit(long msDelay, UserOperationQueue queue)voidsubmitOperationQueues(long msDelay)static voidapplyUserOperationsSync(List<UserOperation> pendingOperationQueue)static voidwipeData(Context context)static voiduserOptedIn()-
-
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
-
setLanguage
void setLanguage(@NonNull() Context context, @Nullable() String language)
Set the new language
- Parameters:
context- Android's contextlanguage- The User's language, null to remove
-
getLanguage
@Nullable() String getLanguage(@NonNull() Context context)
Get the User's language
- Parameters:
context- Android's context
-
setRegion
void setRegion(@NonNull() Context context, @Nullable() String region)
Set the User's region
- Parameters:
context- Android's contextregion- the User's region, null to remove
-
getRegion
@Nullable() String getRegion(@NonNull() Context context)
Get the User's region
- Parameters:
context- Android's context
-
setCustomID
void setCustomID(@NonNull() Context context, @Nullable() String customID)
Set the User's custom identifier
- Parameters:
context- Android's contextcustomID- the User's custom identifier , null to remove
-
getCustomID
String getCustomID(@NonNull() Context context)
Get the custom ID if any, null otherwise
- Parameters:
context- Android's context
-
getVersion
long getVersion(@NonNull() Context context)
Get the data version
- Parameters:
context- Android's context
-
incrementVersion
synchronized void incrementVersion(@NonNull() Context context)
Get the data version and increment it
- Parameters:
context- Android's context
-
clearInstallationData
void clearInstallationData()
Clear all installation data (attributes + tags)
-
startSendWS
void startSendWS(long msDelay)
-
startCheckWS
void startCheckWS(long msDelay)
-
storeTransactionID
void storeTransactionID(String transactionID, long version)
-
bumpVersion
void bumpVersion(long serverVersion)
-
trackLocation
void trackLocation(Location location)
-
submitOnApplyQueue
static void submitOnApplyQueue(long msDelay, Runnable r)
-
addOperationQueueAndSubmit
void addOperationQueueAndSubmit(long msDelay, UserOperationQueue queue)
-
submitOperationQueues
void submitOperationQueues(long msDelay)
-
applyUserOperationsSync
static void applyUserOperationsSync(List<UserOperation> pendingOperationQueue)
-
userOptedIn
static void userOptedIn()
-
-
-
-