I am developing an Android app for blind users. I expect blind users to use TalkBack. My specific question is about the TalkBack message that comes up ("keyboard hidden") when the user finishes entering text on the keyboard. I would like to suppress this message or detect the end of the spoken message.
Background/context: a common problem with TalkBack is that its speech messages clobber any other speech synthesis or speech recognition that you want to do in your app. I have worked around this problem in most cases by contriving to suppress TalkBack messages, for example, by setting Activity titles to a null string.
Currently I am adding functionality that uses the keyboard (with the option of speech recognition, incidentally). I was able to suppress the TalkBack message that ordinarily comes up to announce the appearance of the keyboard.
However, I cannot suppress the TalkBack message ("keyboard hidden") that comes up when the user finishes entering text (in my app, by pressing the Done key on the keyboard). This particular message is specific to the standard Google keyboard, which, of course, I would like to support. (There is no corresponding message with the TouchPal keyboard, but that keyboard has other problems regarding TalkBack.)
I would be happy if I could do either of the following:
Suppress the TalkBack message when the (Google) keyboard is hidden, or
Detect when the TalkBack message has finished.
By way of context, (2) is what I do with speech synthesis within my app. I use TextToSpeech.setOnUtteranceProgressListener to detect the end of synthesized speech, and only after the end of the speech do I start speech recognition or another synthesized speech message. This works very well. Speech generated by my app does not clobber other speech, nor get picked up by speech recognition. TalkBack, on the other hand, appears to be oblivious to anything else going on, and I would welcome any ideas on how to cope with that.
Thank you very much.
You cant suppress it. Instead of that pass empty text to launching activity or view. This will help your purpose.