Speechrecognizer Not Available When Targeting Android 11
While testing an application after increasing the targetLevel to 30, I found that the SpeechRecognizer is not available any more, i.e. SpeechRecognizer.isRecognitionAvailable() alw
Solution 1:
I finally found a solution.
Trying to actually use the (allegedly not available) recognizer lead to this message in the logcat :
10-13 09:19:50.273 1531 1799 I AppsFilter: interaction:PackageSetting{eb6a1b2my.application.package/10225}->PackageSetting{ab34503com.google.android.googlequicksearchbox/10140}BLOCKED10-13 09:19:50.273 1531 1799 W ActivityManager:UnabletostartserviceIntent { act=android.speech.RecognitionServicecmp=com.google.android.googlequicksearchbox/com.google.android.voicesearch.serviceapi.GoogleRecognitionService } U=0:notfound10-13 09:19:50.273 25348 25348 E SpeechRecognizer:bindtorecognitionservicefailed
So the problem seems to be related to this new Android 11 "feature", and the solution was to add a query to the manifest for the blocked intent :
<manifest...><queries><intent><actionandroid:name="android.speech.RecognitionService" /></intent></queries>
Post a Comment for "Speechrecognizer Not Available When Targeting Android 11"