summaryrefslogtreecommitdiffstats
path: root/core/java/android/speech/RecognitionService.java
diff options
context:
space:
mode:
authorMike LeBeau <mlebeau@android.com>2010-02-11 14:01:09 -0800
committerMike LeBeau <mlebeau@android.com>2010-02-11 14:02:46 -0800
commit378ae126d9d61feed77ad596fa0823394eac6240 (patch)
treeae7c0577b67dde049fbb10b1cd0461cbb2934bdd /core/java/android/speech/RecognitionService.java
parent28a5dc229ed25c771cde25668928edc788073029 (diff)
downloadframeworks_base-378ae126d9d61feed77ad596fa0823394eac6240.zip
frameworks_base-378ae126d9d61feed77ad596fa0823394eac6240.tar.gz
frameworks_base-378ae126d9d61feed77ad596fa0823394eac6240.tar.bz2
Add SERVICE_INTERFACE and SERVICE_META_DATA constants to RecognitionService,
to be used by anyone implementing a voice recognition service. Also define a new <recognition-service> styleable to be used in such service's metadata xml. Still to do: Change VoiceSearch's GoogleRecognitionService to respond to this intent, and actually use this intent instead of ACTION_RECOGNIZE_SPEECH here in RecognitionService.
Diffstat (limited to 'core/java/android/speech/RecognitionService.java')
-rw-r--r--core/java/android/speech/RecognitionService.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/speech/RecognitionService.java b/core/java/android/speech/RecognitionService.java
index 0d74960..5de6cf0 100644
--- a/core/java/android/speech/RecognitionService.java
+++ b/core/java/android/speech/RecognitionService.java
@@ -16,6 +16,8 @@
package android.speech;
+import android.annotation.SdkConstant;
+import android.annotation.SdkConstant.SdkConstantType;
import android.app.Service;
import android.content.Intent;
import android.content.pm.PackageManager;
@@ -32,6 +34,18 @@ import android.util.Log;
* implementation of this service is state-less.
*/
public abstract class RecognitionService extends Service {
+ /**
+ * The {@link Intent} that must be declared as handled by the service.
+ */
+ @SdkConstant(SdkConstantType.SERVICE_ACTION)
+ public static final String SERVICE_INTERFACE = "android.speech.RecognitionService";
+
+ /**
+ * Name under which a RecognitionService component publishes information about itself.
+ * This meta-data should reference an XML resource containing a
+ * <code>&lt;{@link android.R.styleable#RecognitionService recognition-service}&gt;</code> tag.
+ */
+ public static final String SERVICE_META_DATA = "android.speech";
/** Log messages identifier */
private static final String TAG = "RecognitionService";