I found it in my Asus Zenfone3 and Android emulator API_25 Nexus5X. The Google voice typing (com.google.android.googlequicksearchbox), when launched from SW keyboard, can have many minutes timeout(it seems never timeout unless I speak something). This microphone icon is green.

But, when I launch the voice typing dialog by an app with below simple code, it just has 2 seconds timeout. This microphone icon is blue. It's same as when launching voice search from Chrome, Youtube etc.

What's the difference? Is there any way to make the timeout as long as it is launched from keyboard?

            Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
            startActivityForResult(intent, 1);

0

There are 0 best solutions below