cordova-plugin-speechrecognition icon indicating copy to clipboard operation
cordova-plugin-speechrecognition copied to clipboard

speech recognition service is not available on system on Android 11 Beta

Open rksoni31895 opened this issue 5 years ago • 7 comments

I am Getting speech recognition service is not available on system on latest android 11 beta. I am using: Ionic version 4. Ionic webview version: 4.2.0. Cordova-android: 9.0.0

My Target sdk version: 30

In older version of android speech recognition is working as expected.

rksoni31895 avatar Aug 23 '20 14:08 rksoni31895

you should check, if the "Google App" play.google.com/com.google.android.googlequicksearchbox is installed:
on most Android systems I've come across, the default/system speech recognition engine is the one that is provided by that app (and since this cordova plugin relies on the system's engine, at least one must be installed)

russaa avatar Sep 21 '20 15:09 russaa

I have this app installed on my phone but am still getting this error. Is there anything else that I could try?

joshglazer avatar Mar 03 '21 00:03 joshglazer

nor on Android 11 production (Samsung 8+ S20 FE 5G)

sdetweil avatar Jun 22 '21 22:06 sdetweil

In Android 11 the connection to the voice recognition service must be done manually (https://developer.android.com/training/basics/intents/package-visibility-use-cases). Adding next code in AndroidManifest.xml worked for me:

<queries>
  <intent>
    <action android:name="android.speech.RecognitionService" />
  </intent>
</queries>

dteso avatar Jun 27 '21 17:06 dteso

It Work for me.

In Android 11 the connection to the voice recognition service must be done manually (https://developer.android.com/training/basics/intents/package-visibility-use-cases). Adding next code in AndroidManifest.xml worked for me:

<queries>
  <intent>
    <action android:name="android.speech.RecognitionService" />
  </intent>
</queries>

secretmoo35 avatar Jul 14 '21 04:07 secretmoo35

@dteso That idea sounds amazing, how can I add this to my AndroidManifest.xml, if 'cordova platform add' build by himself the android folder?

@secretmoo35 you did it?

OtherCarlos avatar Dec 17 '21 22:12 OtherCarlos

@OtherCarlos

AndroidManifest

Add this code in file "config.xml"

<platform name="android">
...
...
<config-file parent="/manifest" target="AndroidManifest.xml" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
            <queries>
                <intent>
                    <action android:name="android.speech.RecognitionService" />
                </intent>
            </queries>
</config-file>
</platform>

secretmoo35 avatar Dec 18 '21 01:12 secretmoo35