The idea is to take a user voice input on the press of a button and pass it to the search inside the app. Because of device limitations we are using the SearchViewCompat instead of the useful SearchView. I have been able to grab the voice output using this link, but there is not a simple way to pass the text to the search bar this way.
The search view itself shows as a view (so no setText()), but if I can just say "use mic key on keyboard" or something as soon as the searchbar comes up, I think it might work. Any help would be greatly appreciated.
Thanks,
SGB.
No, it's not possible. At least, there is no simple way to launch voice input without using RecognitionListener or manually clicking the voice input button on soft keyboard.
As far as I know, this post explains how to integrate voice into an IME which actually uses this library: google-voice-typing-integration. It might inspire you a bit.
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