How to programmatically override "Google Voice Search" over "Samsung powered by Vlingo"?
Asked Answered
S

1

13

Some devices (like Samsung Galaxy S3) come pre-installed with Samsung powered by Vlingo instead of Google Voice Search.

In my app, I would like to programmatically override which speech recognition engine to use, so that Google Voice Search is always used by my app.

So my questions are:

  1. Is there a way to tell which speech recognition engines are installed? (If so, how?)
  2. Is there a way to tell which speech recognition engine is selected in the user settings? (If so, how?)
  3. Is there a programmatic way to override user's selection, so that my app always invokes Google Voice Search? (if so , how?)

Help will be appreciated

Smidgen answered 14/3, 2013 at 2:57 Comment(2)
Looks like I'm not the only one looking for a solution. This one to no avail. But this one seems to have succeeded uninstalling as a user. Still, I prefer a way to programmatically achieve what I want without uninstalling "Samsung powered by Vlingo".Smidgen
I don't think you can do this. Samsung's solution is already programmatically overriding yours :PLlewellyn
E
6

The answer to all your questions is "yes".

createSpeechRecognizer can be given the package name of the recognizer to use. So if you know the package name then you can override the default.

To detect the available services, use:

List<ResolveInfo> services =
    getPackageManager().queryIntentServices(
        new Intent(RecognitionService.SERVICE_INTERFACE), 0);

For more details study the source code of Babble. I don't know if this is the best way to do it (any feedback is welcome) but it has worked on my devices. (Babble in general assumes Android 4+, but the speech recognizer detection part might also work on earlier versions.)

Evangelist answered 14/3, 2013 at 16:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.