Even though this is not documented anywhere, I've been able to find out that, with the introduction of multilanguage support in its last update, Google Search is now taking a new extra in RecognizerIntent called "android.speech.extra.EXTRA_ADDITIONAL_LANGUAGES". As suggested by its name, it is a string array that would be used to specify other languages in addition to the main one, which would still be given by RecognizerIntent.EXTRA_LANGUAGE. The problem is that Google Search ignores RecognizerIntent.EXTRA_LANGUAGE if this new extra is not given along with it. This means that adding the following line to your code is enough to solve the problem:
intent.putExtra("android.speech.extra.EXTRA_ADDITIONAL_LANGUAGES", new String[]{});
But please note that, even though this works, it doesn't change the fact that there is a bug in Google Search. As I've said before, this new extra is not documented anywhere, and Google Search is not following the specification of Android's speech recognition API. As the developer of both Google Search and Android, Google should therefore either:
Change the specification of the speech recognition API in Android,
but this would break backward compatibility.
Update the Google Search app so that it correctly follows the
current specification.
The second option is obviously the most logical one, and we should therefore let Google know about the bug so that they fix it. It looks like the official Google Search Help Forum is the right place to do this, but so far nobody from Google has paid attention to the thread I created there for it (https://productforums.google.com/forum/#!topic/websearch/PUjEPmdSzSE/discussion). So if you have had this issue please post your complains there to grab Google's attention, and let's see if we get an official answer this way.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…