public interface SyncedClient
SyncService
Modifier and Type | Method and Description |
---|---|
void |
cancelStimuli()
Used by apps displaying stimuli to the users.
|
void |
closeApp()
This is called when the user has clicked "Close apps" button at the FSenSync Server.
|
java.lang.String |
getAppSetting(java.lang.String setting)
Used by apps displaying stimuli to the users.
|
java.lang.Boolean |
getRecordingServiceReady() |
void |
newSyncState(int syncState,
int oldState,
java.lang.String stateString)
Called when the
SyncService enters a new state. |
void |
setAppSetting(java.lang.String setting,
java.lang.String value)
Used by apps displaying stimuli to the users.
|
void |
setTagsToUi()
This is called when tags have been assigned to the app at the FSenSync Server.
|
void |
showExtraMessageOnScreen(java.lang.String message) |
void |
startPreparingPlay(java.lang.String fileBaseName,
java.lang.String stimuliName,
long desiredStartTime)
Used by apps displaying stimuli to the users.
|
java.lang.Boolean |
startRecording(java.lang.String fileBaseName,
java.lang.String recordingNumber,
java.io.PrintWriter metaOutputStream)
Called when server wants to start recordings.
|
java.lang.Boolean |
stopRecording()
Called when server wants to stop recordings.
|
void |
updateExperimentInfoToUi()
Called when the
SyncService has received a short id from the server. |
java.lang.Boolean getRecordingServiceReady()
void setTagsToUi()
void updateExperimentInfoToUi()
SyncService
has received a short id from the server.
The same id can be sent multiple times.java.lang.Boolean startRecording(java.lang.String fileBaseName, java.lang.String recordingNumber, java.io.PrintWriter metaOutputStream)
fileBaseName
- the start of the file name that should be used so that the meta file matched with your data filesrecordingNumber
- number of the recording that is same with all other apps started at the same time by the servermetaOutputStream
- Stream where extra meta information can be printed. Close this when you are done with it!java.lang.Boolean stopRecording()
void newSyncState(int syncState, int oldState, java.lang.String stateString)
SyncService
enters a new state.syncState
- matches a state defined in SyncService
oldState
- matches a state defined in SyncService
stateString
- a string the describes the current state e.g. "Recording"void startPreparingPlay(java.lang.String fileBaseName, java.lang.String stimuliName, long desiredStartTime)
fileBaseName
- stimuliName
- desiredStartTime
- void cancelStimuli()
void showExtraMessageOnScreen(java.lang.String message)
message
- error message that should seen by an user e.g. a missing stimulus filejava.lang.String getAppSetting(java.lang.String setting)
setting
- the setting id stringvoid setAppSetting(java.lang.String setting, java.lang.String value)
setting
- the setting id stringvalue
- the setting value to be used by the clientvoid closeApp()