org.android.activityminer.app.service
Interface IBackgroundService

Package class diagram package IBackgroundService
All Superinterfaces:
IInterface
All Known Implementing Classes:
IBackgroundService.Stub, IBackgroundService.Stub.Proxy

public interface IBackgroundService
extends IInterface


Nested Class Summary
static class IBackgroundService.Stub
          Local-side IPC implementation stub class.
 
Method Summary
 void broadcastProgress()
          Triggers a progress broadcast of the current task if there is one active
 boolean doBatchCreateAndExportTrainingData(Configuration baseConfig, long[] windowSizes, long[] sampleRates, double[] gfCutOffs)
          Method to start batch training data creation and export for any combination of the given window sizes and sample rates.
 boolean doCreateModel(Configuration config, String modelName)
          Method to start model creation from a given configuration in the background
 boolean doDBRawDataUpdate(Configuration config)
          Method to trigger db related updates of the raw time series (Gap filling and linear acceleration updates for older DBs).
 boolean doEvaluate(Configuration config, ParcelableFeatureTypeSets featureSets, boolean bestResultsOnly)
          Method to start evaluation in the background
 boolean doExportDatabase(String fileName)
          Method to start database export
 boolean doExportModelFile(String fileName)
          Method to start a model file export
 boolean doExportRecordingData(Configuration config, String fileName)
          Method to start recording data export
 boolean doExportTrainingData(Configuration config, String fileName)
          Method to start training data export
 boolean doExtractFeatures(Configuration config, long[] sequenceIds)
          Method to start feature extraction in the background
 boolean doImportDatabase(String fileName)
          Method to start database import
 boolean doSearchBestFeatureSubset(Configuration config, ParcelableFeatureTypeSets featureSets, int size)
          Method to start a search for the best feature subset of a given size.
 boolean doUpdateLinearAccelerations(Configuration config)
          Method to start recalculation of liner acceleration based on the reconstructed raw acceleration values.
 String getCurrentTaskDescription()
          Getter for the current task description
 ServiceState getServiceState()
          Getter for the service state
 void stopSelf()
          Signals the service to stop itself when idle
 
Methods inherited from interface android.os.IInterface
asBinder
 

Method Detail

doExtractFeatures

boolean doExtractFeatures(Configuration config,
                          long[] sequenceIds)
                          throws RemoteException
Method to start feature extraction in the background

Parameters:
config - the configuration to use
sequenceIds - a list with the identifiers of the continuous recording aequences to extract features from
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

getServiceState

ServiceState getServiceState()
                             throws RemoteException
Getter for the service state

Returns:
the service state
Throws:
RemoteException

doEvaluate

boolean doEvaluate(Configuration config,
                   ParcelableFeatureTypeSets featureSets,
                   boolean bestResultsOnly)
                   throws RemoteException
Method to start evaluation in the background

Parameters:
config - the configuration to use
featureSets - a set of feature sets to evaluate
bestResultsOnly - flag to limit the result list to the best results (ranked by overall prediction accuracy)
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doSearchBestFeatureSubset

boolean doSearchBestFeatureSubset(Configuration config,
                                  ParcelableFeatureTypeSets featureSets,
                                  int size)
                                  throws RemoteException
Method to start a search for the best feature subset of a given size.

Parameters:
config - the configuration to use
featureSets - a set with a single set of features to search in
size - the subset size
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doCreateModel

boolean doCreateModel(Configuration config,
                      String modelName)
                      throws RemoteException
Method to start model creation from a given configuration in the background

Parameters:
config - the configuration to use
modelName - the model name to use
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

getCurrentTaskDescription

String getCurrentTaskDescription()
                                 throws RemoteException
Getter for the current task description

Returns:
the current task description
Throws:
RemoteException

stopSelf

void stopSelf()
              throws RemoteException
Signals the service to stop itself when idle

Throws:
RemoteException

broadcastProgress

void broadcastProgress()
                       throws RemoteException
Triggers a progress broadcast of the current task if there is one active

Throws:
RemoteException

doExportTrainingData

boolean doExportTrainingData(Configuration config,
                             String fileName)
                             throws RemoteException
Method to start training data export

Parameters:
config - the current configuration
fileName - the destination file name
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doExportRecordingData

boolean doExportRecordingData(Configuration config,
                              String fileName)
                              throws RemoteException
Method to start recording data export

Parameters:
config - the current configuration
fileName - the destination file name
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doExportDatabase

boolean doExportDatabase(String fileName)
                         throws RemoteException
Method to start database export

Parameters:
fileName - the destination file name
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doExportModelFile

boolean doExportModelFile(String fileName)
                          throws RemoteException
Method to start a model file export

Parameters:
fileName - the model file name
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doImportDatabase

boolean doImportDatabase(String fileName)
                         throws RemoteException
Method to start database import

Parameters:
fileName - the destination file name
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doBatchCreateAndExportTrainingData

boolean doBatchCreateAndExportTrainingData(Configuration baseConfig,
                                           long[] windowSizes,
                                           long[] sampleRates,
                                           double[] gfCutOffs)
                                           throws RemoteException
Method to start batch training data creation and export for any combination of the given window sizes and sample rates.

Parameters:
baseConfig - the basic configuration
windowSizes - the window sizes
sampleRates - the sample rates
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doUpdateLinearAccelerations

boolean doUpdateLinearAccelerations(Configuration config)
                                    throws RemoteException
Method to start recalculation of liner acceleration based on the reconstructed raw acceleration values.

Parameters:
config - the current configuration
Throws:
RemoteException

doDBRawDataUpdate

boolean doDBRawDataUpdate(Configuration config)
                          throws RemoteException
Method to trigger db related updates of the raw time series (Gap filling and linear acceleration updates for older DBs).

Parameters:
config - the current configuration
Throws:
RemoteException