Build 1.0_r1(from source)

android.speech.recognition
Class AbstractSrecGrammarListener

java.lang.Object
  extended by android.speech.recognition.AbstractSrecGrammarListener
All Implemented Interfaces:
EmbeddedGrammarListener, GrammarListener, SrecGrammarListener

public abstract class AbstractSrecGrammarListener
extends Object
implements SrecGrammarListener

An SrecGrammarListener whose methods are empty. This class exists as convenience for creating listener objects.


Constructor Summary
AbstractSrecGrammarListener()
           
 
Method Summary
 void onAddItemList()
          Invokes after all items of the list have been added.
 void onAddItemListFailure(int index, Exception e)
          Invoked when adding a SlotItem from a list fails.
 void onCompileAllSlots()
          Invokes after all grammar slots have been compiled.
 void onError(Exception e)
          Invoked when a grammar related operation fails.
 void onLoaded()
          Invoked after the Grammar is loaded.
 void onResetAllSlots()
          Invokes after all grammar slots have been reset.
 void onSaved(String path)
          Invoked after the grammar is saved.
 void onUnloaded()
          Invoked after the Grammar is unloaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSrecGrammarListener

public AbstractSrecGrammarListener()
Method Detail

onCompileAllSlots

public void onCompileAllSlots()
Description copied from interface: EmbeddedGrammarListener
Invokes after all grammar slots have been compiled.

Specified by:
onCompileAllSlots in interface EmbeddedGrammarListener

onError

public void onError(Exception e)
Description copied from interface: SrecGrammarListener
Invoked when a grammar related operation fails.

Specified by:
onError in interface EmbeddedGrammarListener
Specified by:
onError in interface GrammarListener
Specified by:
onError in interface SrecGrammarListener
Parameters:
e - the cause of the failure.
GrammarOverflowException if the grammar slot is full and no further items may be added to it.
UnsupportedOperationException if different words with the same pronunciation are added.
IllegalStateException if reseting or compiling the slots fails.
IOException if the grammar could not be loaded or saved.


onLoaded

public void onLoaded()
Description copied from interface: GrammarListener
Invoked after the Grammar is loaded.

Specified by:
onLoaded in interface GrammarListener

onResetAllSlots

public void onResetAllSlots()
Description copied from interface: EmbeddedGrammarListener
Invokes after all grammar slots have been reset.

Specified by:
onResetAllSlots in interface EmbeddedGrammarListener

onSaved

public void onSaved(String path)
Description copied from interface: EmbeddedGrammarListener
Invoked after the grammar is saved.

Specified by:
onSaved in interface EmbeddedGrammarListener
Parameters:
path - the path the grammar was saved to

onUnloaded

public void onUnloaded()
Description copied from interface: GrammarListener
Invoked after the Grammar is unloaded.

Specified by:
onUnloaded in interface GrammarListener

onAddItemList

public void onAddItemList()
Description copied from interface: SrecGrammarListener
Invokes after all items of the list have been added.

Specified by:
onAddItemList in interface SrecGrammarListener

onAddItemListFailure

public void onAddItemListFailure(int index,
                                 Exception e)
Description copied from interface: SrecGrammarListener
Invoked when adding a SlotItem from a list fails. This callback will be trigger for each element in the list that fails to be add in the slot, unless there is a grammar fail operation, which will be reported in the onError callback.

Specified by:
onAddItemListFailure in interface SrecGrammarListener
Parameters:
index - of the list that could not be added to the slot
e - the cause of the failure.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature