public class SpeechSubmitHandler
extends java.lang.Object
| Constructor and Description |
|---|
SpeechSubmitHandler(android.speech.tts.TextToSpeech textToSpeech)
Constructor.
|
SpeechSubmitHandler(android.speech.tts.TextToSpeech textToSpeech,
android.widget.TextView nextInstructionText,
android.content.Context context)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
submit(GeneratedSpeech speech,
int type)
Submits the given speech using the given type
|
void |
submitAction(GeneratedSpeech speech)
Submit the given generated speech as an action
|
void |
submitQueueAdd(GeneratedSpeech speech)
Submit the given generated speech with type TextToSpeech.QUEUE_ADD
|
void |
submitQueueFlush(GeneratedSpeech speech)
Submit the given generated speech with type TextToSpeech.QUEUE_FLUSH
|
void |
submitSilent(GeneratedSpeech speech)
Submits the given speech without silently (writes to the
nextInstructionText if availible)
|
void |
submitSpeech(GeneratedSpeech speech,
int type,
boolean write)
Submits the given speech using the given type.
|
void |
submitString(java.lang.String speech,
int type,
boolean write)
Submits the given string using the given type.
|
void |
warnUser()
Warn user to get back on course
|
public SpeechSubmitHandler(android.speech.tts.TextToSpeech textToSpeech)
textToSpeech - object used to submit speech to thr userpublic SpeechSubmitHandler(android.speech.tts.TextToSpeech textToSpeech,
android.widget.TextView nextInstructionText,
android.content.Context context)
textToSpeech - object used to submit speech to thr usernextInstructionText - TextView which displays the next instructioncontext - Context under which the application is being runpublic void warnUser()
public void submitAction(GeneratedSpeech speech)
speech - generated speechpublic void submitQueueFlush(GeneratedSpeech speech)
speech - generated speechpublic void submitQueueAdd(GeneratedSpeech speech)
speech - generated speechpublic void submit(GeneratedSpeech speech, int type)
speech - generated speechtype - submit typepublic void submitSilent(GeneratedSpeech speech)
speech - generated speechpublic void submitSpeech(GeneratedSpeech speech, int type, boolean write)
speech - generated speechtype - submit typewrite - whether the submitted speech should be written to
the nextInstructionTextpublic void submitString(java.lang.String speech,
int type,
boolean write)
speech - generated speechtype - submit typewrite - whether the submitted speech should be written to
the nextInstructionText