Can we have an google voice action button next to edittext
, so whenever the user wants to input something into edittext he just taps the button, speaks and gets into the edittext
.
Can we do something like that, rather that the user has to tap on the edittext
to open up soft keyboard choose voice action button and then speak which gets printed on to edittext
.
Looking forward to your reply.
thanks.
Put 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, "Voice recognition Demo...");
startActivityForResult(intent, REQUEST_CODE);
into your onClick() and let onActivityResult() fill in the result.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With