androidandroid-studiogoogle-voice-search

Which library contains `com.google.android.voicesearch.DetailsReceiver` nowadays?


I finally migrated an old project of mine from Eclipse/ADT to Android Studio (2021.3.1.17).

In the course of this migration, I fixed numerous issues stemming from outdated and deprecated methods and keywords that used to work perfectly on Android 2.2 (API 8) and did not produce any warnings on Eclipse/ADT.

But now, on Android Studio 2021.3, target SDK 33, I am getting this error in AndroidManifest.xml:

Class referenced in the manifest, 
`com.google.android.voicesearch.DetailsReceiver`, 
was not found in the project or the libraries

I combed Google for clues on how to fix this but apparently this DetailsReceiver is so old that there really is no reference to it anymore.

How do eliminate this error in Android Studio? Is there a reference I can add to the module to make it go away?

Update: The package that used to include this DetailsReceiver used be downloadable from market://details?id=com.google.android.voicesearch. It no longer exists on Google Play.

If you search Google Play for com.google.android.voicesearch you will get the following matches associated with Google LLC:

  1. Google Assistant
  2. Google Assistant Go
  3. Google
  4. Google Access
  5. Google Go
  6. Assistant
  7. I may have missed one...

I am confused. So many candidates for a direct replacement of com.google.android.voicesearch but unclear documentation or information about this. Which downloadable package replaced it?

I am emphasizing "downloadable" because, on an out-of-box Google Pixel 4a (Android 11), PackagManager cannot find RecognizerIntent.ACTION_RECOGNIZE_SPEECH when queried.

The closest clue I have been able to find is in this SO thread: how to show up the google voice recognition settings in my app?

But I need a definitive clearer answer.

Any idea?


Solution

  • There are 2 separate issue related to the SpeechRecognizer:

    Issue 1: PackagManager's inability to find RecognizerIntent.ACTION_RECOGNIZE_SPEECH when queried is due to a new requirement starting from Android 11 (API 30) and higher to explicitly specify package visibility in AndroidManifest.xml:

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

    Issue 2: What replaced market://details?id=com.google.android.voicesearch is https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox (AKA Google, #3 in the OP question).

    It is listed among the components in:

    1. SO answer to How to to display SpeechRecognizer settings and
    2. SO answer to SpeechRecognizer not available when targeting Android 11.

    It is still unclear when exactly the Google app replaced the Google Voice Search app, but among my devices, this appears to be as early as in Android 8.1. So, this could be earlier.

    Googling "voicesearch" replaced by "googlequicksearchbox" site:google.com reveals quite a few matches but no official announcement per se. Yet, some claim that the package com.google.android.googlequicksearchbox was first introduced in Android 4.1 (Jelly Bean) which was released in June 2012.