I know you can increase the amount of time to consider input complete by calling :
intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS,5000);
However, is there a way after kicking off the Android Voice recognition activity, to stop it explicitly, say after receiving a “keyword”.
@Mike is right.
This works:
You have specify a Long. Just putting a number (“2000”) gets interpreted as an Integer, which is not valid.