Android Code Snippet XSpeechRecognizer Android 11+ (Fix isRecognitionAvailable always false)

Hi everyone, i came across for the first time in a problem related to Android 11+
I'm using the XSpeechRecognizer library to detect words from the user to text. On my phone (Android 9) is ok, but on another was always failing the "isRecognitionAvailable()" test.

thanks to this post i solved by adding the following code to the manifest.


B4X:
AddManifestText(
<queries>
  <intent>
    <action android:name="android.intent.action.TTS_SERVICE" />
  </intent>
  <intent>
    <action android:name="android.speech.RecognitionService" />
  </intent>
</queries>
)
 
Top