Package com.batch.android.module
Class BatchModuleMaster
- java.lang.Object
-
- com.batch.android.module.BatchModule
-
- com.batch.android.module.BatchModuleMaster
-
public class BatchModuleMaster extends BatchModule
Module master that dispatch to subcribed modules
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbatchContextBecameAvailable(android.content.Context applicationContext)Called by Batch as soon as a context is available in the runtimeManager For convenience, the application context is available as a parameter.voidbatchDidStart()Called by Batch right after batch start
NB : Same context and activity that in willStart but with the new stateState.READYsetvoidbatchDidStop()Called by Batch right after batch stop
NB : No context or activity are availablevoidbatchIsFinishing()Called by Batch before switching toState.FINISHING
NB : Context and activity are still available from the runtimeManagervoidbatchWillStart()Called by Batch before batch start
NB : Context & activity are already available from the runtimeManagervoidbatchWillStop()Called by Batch before switching toState.OFF
NB : Context is still available from runtimeManager (not activity)java.lang.StringgetId()ID of the moduleintgetState()Should return the state of the module (usually 0 for deactivated, 1 for activated)static BatchModuleMasterprovide()
-
-
-
Method Detail
-
provide
public static BatchModuleMaster provide()
-
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:
-
batchContextBecameAvailable
public void batchContextBecameAvailable(@NonNull android.content.Context applicationContext)Description copied from class:BatchModuleCalled by Batch as soon as a context is available in the runtimeManager For convenience, the application context is available as a parameter. LocalBroadcastManager is also up.- Overrides:
batchContextBecameAvailablein classBatchModule
-
batchWillStart
public void batchWillStart()
Description copied from class:BatchModuleCalled by Batch before batch start
NB : Context & activity are already available from the runtimeManager- Overrides:
batchWillStartin classBatchModule
-
batchDidStart
public void batchDidStart()
Description copied from class:BatchModuleCalled by Batch right after batch start
NB : Same context and activity that in willStart but with the new stateState.READYset- Overrides:
batchDidStartin classBatchModule
-
batchIsFinishing
public void batchIsFinishing()
Description copied from class:BatchModuleCalled by Batch before switching toState.FINISHING
NB : Context and activity are still available from the runtimeManager- Overrides:
batchIsFinishingin classBatchModule
-
batchWillStop
public void batchWillStop()
Description copied from class:BatchModuleCalled by Batch before switching toState.OFF
NB : Context is still available from runtimeManager (not activity)- Overrides:
batchWillStopin classBatchModule
-
batchDidStop
public void batchDidStop()
Description copied from class:BatchModuleCalled by Batch right after batch stop
NB : No context or activity are available- Overrides:
batchDidStopin classBatchModule
-
-