|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.content.Context
android.content.ContextWrapper
android.view.ContextThemeWrapper
android.app.Activity
de.unikassel.android.sdcframework.app.AbstractServiceControlActivity
de.unikassel.android.sdcframework.app.SDCServiceController
public final class SDCServiceController
The main controller activity for the sensor data collection service. It does provide
Field Summary | |
---|---|
private Handler |
eventHandler
The event handler to handle log event messages |
private TextView |
logView
The text view for logging |
private ISDCService |
service
Reference to a running service when bound. |
private ServiceConnection |
serviceConnection
The service connection |
private View.OnClickListener |
startListener
the start service button listener |
private View.OnClickListener |
stopListener
the stop service button listener |
private SparseIntArray |
textColorMap
The text color map |
Fields inherited from class android.app.Activity |
---|
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK |
Constructor Summary | |
---|---|
SDCServiceController()
Constructor |
Method Summary | |
---|---|
private TextView |
getLogView()
Getter for the text view |
ISDCService |
getService()
Getter for the service |
private void |
handleLogEvent(LogEvent logEvent)
Method to handle for log events |
private boolean |
onClearDB()
Method to handle the selection of "clear database" in the option menu |
private boolean |
onClearLog()
Method to handle selection of "clear log" in the option menu |
protected void |
onCreate(Bundle savedInstanceState)
|
boolean |
onCreateOptionsMenu(Menu menu)
|
protected void |
onDestroy()
|
void |
onEvent(ObservableEventSource<? extends LogEvent> eventSource,
LogEvent observedEvent)
This method is called whenever the observed object does create an observed event |
boolean |
onOptionsItemSelected(MenuItem item)
|
protected void |
onPause()
|
boolean |
onPrepareOptionsMenu(Menu menu)
|
protected void |
onResume()
|
protected void |
onServiceRunningStateChanged(boolean isRunning)
Handler to react on service running state changes. |
private boolean |
onTriggerTransfer()
Method to trigger an archive transfer manually |
private void |
setLogView(TextView logView)
Setter for the logView |
void |
setService(ISDCService service)
Setter for the service |
(package private) void |
updateButtons(boolean serviceIsRunning)
Does change Button states depending on service running state |
Methods inherited from class de.unikassel.android.sdcframework.app.AbstractServiceControlActivity |
---|
getPrefManager, getServiceClass, onActivityResult, onPreferences |
Methods inherited from class android.view.ContextThemeWrapper |
---|
attachBaseContext, getTheme, setTheme |
Methods inherited from class android.content.Context |
---|
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Handler eventHandler
private final View.OnClickListener startListener
private final View.OnClickListener stopListener
private final SparseIntArray textColorMap
private TextView logView
private ISDCService service
private final ServiceConnection serviceConnection
Constructor Detail |
---|
public SDCServiceController()
Method Detail |
---|
public ISDCService getService()
public void setService(ISDCService service)
service
- the service to setprotected void onCreate(Bundle savedInstanceState)
onCreate
in class Activity
protected void onResume()
onResume
in class AbstractServiceControlActivity
protected void onPause()
onPause
in class AbstractServiceControlActivity
protected void onServiceRunningStateChanged(boolean isRunning)
AbstractServiceControlActivity
onServiceRunningStateChanged
in class AbstractServiceControlActivity
isRunning
- running state flagvoid updateButtons(boolean serviceIsRunning)
serviceIsRunning
- flag if the service is Runningpublic boolean onCreateOptionsMenu(Menu menu)
onCreateOptionsMenu
in class AbstractServiceControlActivity
public boolean onPrepareOptionsMenu(Menu menu)
onPrepareOptionsMenu
in class AbstractServiceControlActivity
public boolean onOptionsItemSelected(MenuItem item)
onOptionsItemSelected
in class AbstractServiceControlActivity
private boolean onTriggerTransfer()
private boolean onClearDB()
private boolean onClearLog()
private TextView getLogView()
private void setLogView(TextView logView)
logView
- the logView to setprivate void handleLogEvent(LogEvent logEvent)
logEvent
- the log Eventprotected void onDestroy()
onDestroy
in class AbstractServiceControlActivity
public void onEvent(ObservableEventSource<? extends LogEvent> eventSource, LogEvent observedEvent)
EventObserver
onEvent
in interface EventObserver<LogEvent>
eventSource
- the event generatorobservedEvent
- the event created by the observed object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |