From b1ac72b54b72cb6bb26f6d2b92335189d8669eb0 Mon Sep 17 00:00:00 2001 From: Florian Uunk Date: Fri, 21 Sep 2012 12:16:16 +0100 Subject: [PATCH] Add intents to open text and video from search. We're adding support for searching for text (books, magazines) and video (tv, movies). Bug: 7208141 Change-Id: I19dd2f745518a96b22b02a29c1ab9a89d53cc0cc --- api/current.txt | 2 ++ core/java/android/provider/MediaStore.java | 32 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/api/current.txt b/api/current.txt index 2381732ebc39e..eafb64891a853 100644 --- a/api/current.txt +++ b/api/current.txt @@ -18430,7 +18430,9 @@ package android.provider { field public static final deprecated java.lang.String INTENT_ACTION_MUSIC_PLAYER = "android.intent.action.MUSIC_PLAYER"; field public static final java.lang.String INTENT_ACTION_STILL_IMAGE_CAMERA = "android.media.action.STILL_IMAGE_CAMERA"; field public static final java.lang.String INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE = "android.media.action.STILL_IMAGE_CAMERA_SECURE"; + field public static final java.lang.String INTENT_ACTION_TEXT_OPEN_FROM_SEARCH = "android.media.action.TEXT_OPEN_FROM_SEARCH"; field public static final java.lang.String INTENT_ACTION_VIDEO_CAMERA = "android.media.action.VIDEO_CAMERA"; + field public static final java.lang.String INTENT_ACTION_VIDEO_PLAY_FROM_SEARCH = "android.media.action.VIDEO_PLAY_FROM_SEARCH"; field public static final java.lang.String MEDIA_IGNORE_FILENAME = ".nomedia"; field public static final java.lang.String MEDIA_SCANNER_VOLUME = "volume"; field public static final java.lang.String UNKNOWN_STRING = ""; diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java index cfa5479390600..3c90f1c1856b1 100644 --- a/core/java/android/provider/MediaStore.java +++ b/core/java/android/provider/MediaStore.java @@ -121,6 +121,38 @@ public final class MediaStore { public static final String INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH = "android.media.action.MEDIA_PLAY_FROM_SEARCH"; + /** + * An intent to perform a search for readable media and automatically play content from the + * result when possible. This can be fired, for example, by the result of a voice recognition + * command to read a book or magazine. + *

+ * Contains the {@link android.app.SearchManager#QUERY} extra, which is a string that can + * contain any type of unstructured text search, like the name of a book or magazine, an author + * a genre, a publisher, or any combination of these. + *

+ * Because this intent includes an open-ended unstructured search string, it makes the most + * sense for apps that can support large-scale search of text media, such as services connected + * to an online database of books and/or magazines which can be read on the device. + */ + public static final String INTENT_ACTION_TEXT_OPEN_FROM_SEARCH = + "android.media.action.TEXT_OPEN_FROM_SEARCH"; + + /** + * An intent to perform a search for video media and automatically play content from the + * result when possible. This can be fired, for example, by the result of a voice recognition + * command to play movies. + *

+ * Contains the {@link android.app.SearchManager#QUERY} extra, which is a string that can + * contain any type of unstructured video search, like the name of a movie, one or more actors, + * a genre, or any combination of these. + *

+ * Because this intent includes an open-ended unstructured search string, it makes the most + * sense for apps that can support large-scale search of video, such as services connected to an + * online database of videos which can be streamed and played on the device. + */ + public static final String INTENT_ACTION_VIDEO_PLAY_FROM_SEARCH = + "android.media.action.VIDEO_PLAY_FROM_SEARCH"; + /** * The name of the Intent-extra used to define the artist */