public class SedentaryStimulus extends android.content.BroadcastReceiver implements Stimulus
The main implementation of the Stimulus interface which handles strategies and requests surrounding sedentary behaviour and its related notifications.
BroadcastReceiver
defaultStrategy
Constructor and Description |
---|
SedentaryStimulus()
Empty constructor required by the manifest to define this class as a broadcast receiver
|
SedentaryStimulus(android.content.Context context)
Available in case a default strategy is required to be used as one has not been chosen.
|
SedentaryStimulus(android.content.Context context,
StimulusStrategy s)
The main constrcutor used to define a specific strategy.
|
Modifier and Type | Method and Description |
---|---|
void |
onReceive(android.content.Context context,
android.content.Intent intent)
The method called when a broadcast is received from a strategy class.
|
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
public SedentaryStimulus()
public SedentaryStimulus(android.content.Context context)
context
- the application context used to instantiate this objectpublic SedentaryStimulus(android.content.Context context, StimulusStrategy s)
context
- the application context used to instantiate this objects
- the StimulusStrategy to be used as a strategyStimulusStrategy
public void onReceive(android.content.Context context, android.content.Intent intent)
onReceive
in class android.content.BroadcastReceiver
context
- the context from which the broadcast was sentintent
- the intent with which the broadcast was sent