Skip to content

Commit b1ac72b

Browse files
author
Florian Uunk
committed
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
1 parent 1227233 commit b1ac72b

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

api/current.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18430,7 +18430,9 @@ package android.provider {
1843018430
field public static final deprecated java.lang.String INTENT_ACTION_MUSIC_PLAYER = "android.intent.action.MUSIC_PLAYER";
1843118431
field public static final java.lang.String INTENT_ACTION_STILL_IMAGE_CAMERA = "android.media.action.STILL_IMAGE_CAMERA";
1843218432
field public static final java.lang.String INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE = "android.media.action.STILL_IMAGE_CAMERA_SECURE";
18433+
field public static final java.lang.String INTENT_ACTION_TEXT_OPEN_FROM_SEARCH = "android.media.action.TEXT_OPEN_FROM_SEARCH";
1843318434
field public static final java.lang.String INTENT_ACTION_VIDEO_CAMERA = "android.media.action.VIDEO_CAMERA";
18435+
field public static final java.lang.String INTENT_ACTION_VIDEO_PLAY_FROM_SEARCH = "android.media.action.VIDEO_PLAY_FROM_SEARCH";
1843418436
field public static final java.lang.String MEDIA_IGNORE_FILENAME = ".nomedia";
1843518437
field public static final java.lang.String MEDIA_SCANNER_VOLUME = "volume";
1843618438
field public static final java.lang.String UNKNOWN_STRING = "<unknown>";

core/java/android/provider/MediaStore.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,38 @@ public final class MediaStore {
121121
public static final String INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH =
122122
"android.media.action.MEDIA_PLAY_FROM_SEARCH";
123123

124+
/**
125+
* An intent to perform a search for readable media and automatically play content from the
126+
* result when possible. This can be fired, for example, by the result of a voice recognition
127+
* command to read a book or magazine.
128+
* <p>
129+
* Contains the {@link android.app.SearchManager#QUERY} extra, which is a string that can
130+
* contain any type of unstructured text search, like the name of a book or magazine, an author
131+
* a genre, a publisher, or any combination of these.
132+
* <p>
133+
* Because this intent includes an open-ended unstructured search string, it makes the most
134+
* sense for apps that can support large-scale search of text media, such as services connected
135+
* to an online database of books and/or magazines which can be read on the device.
136+
*/
137+
public static final String INTENT_ACTION_TEXT_OPEN_FROM_SEARCH =
138+
"android.media.action.TEXT_OPEN_FROM_SEARCH";
139+
140+
/**
141+
* An intent to perform a search for video media and automatically play content from the
142+
* result when possible. This can be fired, for example, by the result of a voice recognition
143+
* command to play movies.
144+
* <p>
145+
* Contains the {@link android.app.SearchManager#QUERY} extra, which is a string that can
146+
* contain any type of unstructured video search, like the name of a movie, one or more actors,
147+
* a genre, or any combination of these.
148+
* <p>
149+
* Because this intent includes an open-ended unstructured search string, it makes the most
150+
* sense for apps that can support large-scale search of video, such as services connected to an
151+
* online database of videos which can be streamed and played on the device.
152+
*/
153+
public static final String INTENT_ACTION_VIDEO_PLAY_FROM_SEARCH =
154+
"android.media.action.VIDEO_PLAY_FROM_SEARCH";
155+
124156
/**
125157
* The name of the Intent-extra used to define the artist
126158
*/

0 commit comments

Comments
 (0)