Im using the voice recognition activity of the android API.
For those who never have used it, is something like this:

Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Speech recognition
demo");
startActivityForResult(intent, VOICE_RECOGNITION_REQUEST_CODE);

As you see, it has to be started with a "startActivityForResult", so
you have to wait for the user to speak, the activity recognizes the
words and gives you the results in a "onActivityResult" function.

The problem comes when this activity has no network, or finds no
similarities, or whatever, instead of returning the error to the
function, it asks the user for an action to do (try again or cancel).
I need to keep the app hands-free and i have to options:
1 - avoid this ask-the-user behaviour, or
2 - kill the activity after (lets say...) 15seconds.

How can i do any of both things???

Please help me, this is driving me crazy :(

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to