Package com.batch.android.module
Class OptOutModule
- java.lang.Object
-
- com.batch.android.module.BatchModule
-
- com.batch.android.module.OptOutModule
-
public class OptOutModule extends BatchModule
Batch's Opt Out Module.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringINTENT_OPTED_INstatic java.lang.StringINTENT_OPTED_OUTstatic java.lang.StringINTENT_OPTED_OUT_WIPE_DATA_EXTRAstatic java.lang.StringTAG
-
Constructor Summary
Constructors Constructor Description OptOutModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetId()ID of the moduleintgetState()Should return the state of the module (usually 0 for deactivated, 1 for activated)java.lang.BooleanisOptedOut()booleanisOptedOutSync(android.content.Context context)voidoptIn(android.content.Context context)Promise<java.lang.Void>optOut(android.content.Context context, AdvertisingID advertisingID, boolean wipeData, BatchOptOutResultListener listener)voidtrackOptinEventIfNeeded(android.content.Context context, AdvertisingID advertisingID)voidwipeData(android.content.Context context)-
Methods inherited from class com.batch.android.module.BatchModule
batchContextBecameAvailable, batchDidStart, batchDidStop, batchIsFinishing, batchWillStart, batchWillStop
-
-
-
-
Field Detail
-
TAG
public static final java.lang.String TAG
- See Also:
- Constant Field Values
-
INTENT_OPTED_OUT
public static final java.lang.String INTENT_OPTED_OUT
- See Also:
- Constant Field Values
-
INTENT_OPTED_IN
public static final java.lang.String INTENT_OPTED_IN
- See Also:
- Constant Field Values
-
INTENT_OPTED_OUT_WIPE_DATA_EXTRA
public static final java.lang.String INTENT_OPTED_OUT_WIPE_DATA_EXTRA
- See Also:
- Constant Field Values
-
-
Method Detail
-
isOptedOut
public java.lang.Boolean isOptedOut()
-
isOptedOutSync
public boolean isOptedOutSync(android.content.Context context)
-
trackOptinEventIfNeeded
public void trackOptinEventIfNeeded(@NonNull android.content.Context context, @NonNull AdvertisingID advertisingID)
-
optIn
public void optIn(android.content.Context context)
-
optOut
public Promise<java.lang.Void> optOut(android.content.Context context, AdvertisingID advertisingID, boolean wipeData, BatchOptOutResultListener listener)
-
wipeData
public void wipeData(android.content.Context context)
-
getId
public java.lang.String getId()
Description copied from class:BatchModuleID of the module- Specified by:
getIdin classBatchModule- Returns:
-
getState
public int getState()
Description copied from class:BatchModuleShould return the state of the module (usually 0 for deactivated, 1 for activated)- Specified by:
getStatein classBatchModule- Returns:
-
-