How to get device's default SpeechService provider - Android API 13

Viewed 19

Android 13 removes the SpeechService implementation including RecognitionService, according to this page. It also mentions:

"Apps should use the device's default provider for SpeechService, rather than hard-coding a specific app."

This is the code I am using on APIs less than 13:

String GOOGLE_RECOGNITION_SERVICE_NAME =
        "com.google.android.googlequicksearchbox/com.google.android.voicesearch.serviceapi.GoogleRecognitionService";

SpeechRecognizer speechRecognizer = SpeechRecognizer.createSpeechRecognizer(context,
            ComponentName.unflattenFromString(GOOGLE_RECOGNITION_SERVICE_NAME));

Any ideas on how to get device's default provider for SpeechService?

0 Answers
Related