From ccc6e57848dc5ddc2e3448497517c1c38f8c3482 Mon Sep 17 00:00:00 2001 From: Cedric Ho Date: Mon, 27 Apr 2015 15:01:46 -0700 Subject: Add android.speech.RecognizerIntent EXTRA_PREFER_OFFLINE to indicate whether to only use an offline speech recognition engine. Change-Id: I15fe9b31f74af1438a018a76a9c7755b43bdc835 --- core/java/android/speech/RecognizerIntent.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/java/android/speech/RecognizerIntent.java') diff --git a/core/java/android/speech/RecognizerIntent.java b/core/java/android/speech/RecognizerIntent.java index e991d84..ce94315 100644 --- a/core/java/android/speech/RecognizerIntent.java +++ b/core/java/android/speech/RecognizerIntent.java @@ -403,4 +403,12 @@ public class RecognizerIntent { */ public static final String EXTRA_SUPPORTED_LANGUAGES = "android.speech.extra.SUPPORTED_LANGUAGES"; + + /** + * Optional boolean, to be used with {@link #ACTION_RECOGNIZE_SPEECH}, + * {@link #ACTION_VOICE_SEARCH_HANDS_FREE}, {@link #ACTION_WEB_SEARCH} to indicate whether to + * only use an offline speech recognition engine. The default is false, meaning that either + * network or offline recognition engines may be used. + */ + public static final String EXTRA_PREFER_OFFLINE = "android.speech.extra.PREFER_OFFLINE"; } -- cgit v1.1