Build 1.0_r1(from source)

android.speech.recognition
Interface SrecGrammarListener

All Superinterfaces:
EmbeddedGrammarListener, GrammarListener
All Known Implementing Classes:
AbstractSrecGrammarListener

public interface SrecGrammarListener
extends EmbeddedGrammarListener

Listens for SrecGrammar events.


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 onError(Exception e)
          Invoked when a grammar related operation fails.
 
Methods inherited from interface android.speech.recognition.EmbeddedGrammarListener
onCompileAllSlots, onResetAllSlots, onSaved
 
Methods inherited from interface android.speech.recognition.GrammarListener
onLoaded, onUnloaded
 

Method Detail

onAddItemList

void onAddItemList()
Invokes after all items of the list have been added.


onAddItemListFailure

void onAddItemListFailure(int index,
                          Exception e)
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.

Parameters:
index - of the list that could not be added to the slot
e - the cause of the failure.

onError

void onError(Exception e)
Invoked when a grammar related operation fails.

Specified by:
onError in interface EmbeddedGrammarListener
Specified by:
onError in interface GrammarListener
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.


Build 1.0_r1(from source)

Please submit a feedback, bug or feature