SpeechRecognizer.isRecognitionAvailable() always false in Android 11

I figured out the solution. For some reason, as of API v30, you must add the following to the Manifest file for SpeechRecognizer.isRecognitionAvailable(Context) to return true. My testing found that it only works when placed outside of the <application> tag even though it complains that “element queries is not allowed here”. Add suppress AndroidElementNotAllowed to remove the warning.

<!--suppress AndroidElementNotAllowed -->
        <action android:name="android.speech.RecognitionService" />

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top