|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.content.BroadcastReceiver
de.unikassel.android.sdcframework.broadcast.BatteryLowStateObserver
public class BatteryLowStateObserver
An observable battery low broadcast receiver.
Field Summary | |
---|---|
private ObservableEventSourceImpl<BatteryLowEvent> |
eventSource
The observable event source |
Constructor Summary | |
---|---|
BatteryLowStateObserver()
Constructor |
Method Summary | |
---|---|
boolean |
hasObservers()
Test method for observers. |
void |
notify(BatteryLowEvent data)
Does set the changed flag and notifies all observers |
void |
onCreate(Context applicationContext)
Creation method |
void |
onDestroy(Context applicationContext)
Destroy method |
void |
onPause(Context applicationContext)
Pause method |
void |
onReceive(Context context,
Intent intent)
|
void |
onResume(Context applicationContext)
Resume method |
void |
registerEventObserver(EventObserver<? extends BatteryLowEvent> observer)
Does register an observer |
void |
removeAllObservers()
Does remove all registered observers |
void |
unregisterEventObserver(EventObserver<? extends BatteryLowEvent> observer)
Does delete a registered observer |
Methods inherited from class android.content.BroadcastReceiver |
---|
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final ObservableEventSourceImpl<BatteryLowEvent> eventSource
Constructor Detail |
---|
public BatteryLowStateObserver()
Method Detail |
---|
public void onReceive(Context context, Intent intent)
onReceive
in class BroadcastReceiver
public void registerEventObserver(EventObserver<? extends BatteryLowEvent> observer)
ObserverRegistration
registerEventObserver
in interface ObserverRegistration<BatteryLowEvent>
observer
- the observer to addpublic void unregisterEventObserver(EventObserver<? extends BatteryLowEvent> observer)
ObserverRegistration
unregisterEventObserver
in interface ObserverRegistration<BatteryLowEvent>
observer
- the observer to deletepublic void removeAllObservers()
ObserverRegistration
removeAllObservers
in interface ObserverRegistration<BatteryLowEvent>
public void notify(BatteryLowEvent data)
ObservableEventSource
notify
in interface ObservableEventSource<BatteryLowEvent>
data
- the observable event data to create notifications forpublic void onResume(Context applicationContext)
LifeCycleObject
onResume
in interface LifeCycleObject
applicationContext
- the application contextpublic void onPause(Context applicationContext)
LifeCycleObject
onPause
in interface LifeCycleObject
applicationContext
- the application contextpublic void onCreate(Context applicationContext)
LifeCycleObject
onCreate
in interface LifeCycleObject
applicationContext
- the application contextpublic void onDestroy(Context applicationContext)
LifeCycleObject
onDestroy
in interface LifeCycleObject
applicationContext
- the application contextpublic boolean hasObservers()
ObservableEventSource
hasObservers
in interface ObservableEventSource<BatteryLowEvent>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |