From fb1f5bdef03844547152f921dcaa044269b5a0cb Mon Sep 17 00:00:00 2001
From: Ricardo Cervera
Indicates the search mode (whether the user is looking for a particular artist, album, song, -playlist, or radio channel). Most search modes take additional extras. For example, if the user +or playlist). Most search modes take additional extras. For example, if the user is interested in listening to a particular song, the intent might have three additional extras: the song title, the artist, and the album. This intent supports the following search modes for each value of {@link android.provider.MediaStore#EXTRA_MEDIA_FOCUS}:
@@ -1399,24 +1399,6 @@ listen to. Apps should use more specific search modes when possible. intent as an unstructured search.Radio channel - "vnd.android.cursor.item/radio"
Play a particular radio channel or a radio channel that matches some criteria specified -by additional extras.
-Additional extras:
-"android.intent.extra.genre" - The genre."android.intent.extra.radio_channel" - The radio channel.Playlist - {@link android.provider.MediaStore.Audio.Playlists#ENTRY_CONTENT_TYPE Audio.Playlists.ENTRY_CONTENT_TYPE}
Play a particular playlist or a playlist that matches some criteria specified @@ -1444,13 +1426,13 @@ by additional extras.
Example intent:
-If the user wants to listen to a radio station that plays songs from a particular artist, -a search app may generate the following intent:
+If the user wants to listen to music from a particular artist, a search app may generate the +following intent:
-public void playSearchRadioByArtist(String artist) {
+public void playSearchArtist(String artist) {
Intent intent = new Intent(MediaStore.INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH);
intent.putExtra(MediaStore.EXTRA_MEDIA_FOCUS,
- "vnd.android.cursor.item/radio");
+ MediaStore.Audio.Artists.ENTRY_CONTENT_TYPE);
intent.putExtra(MediaStore.EXTRA_MEDIA_ARTIST, artist);
intent.putExtra(SearchManager.QUERY, artist);
if (intent.resolveActivity(getPackageManager()) != null) {
@@ -1488,7 +1470,6 @@ protected void onCreate(Bundle savedInstanceState) {
String artist = intent.getStringExtra(MediaStore.EXTRA_MEDIA_ARTIST);
String genre = intent.getStringExtra("android.intent.extra.genre");
String playlist = intent.getStringExtra("android.intent.extra.playlist");
- String rchannel = intent.getStringExtra("android.intent.extra.radio_channel");
String title = intent.getStringExtra(MediaStore.EXTRA_MEDIA_TITLE);
// Determine the search mode and use the corresponding extras
@@ -1521,10 +1502,6 @@ protected void onCreate(Bundle savedInstanceState) {
// 'Song' search mode
playSong(album, artist, genre, title);
- } else if (mediaFocus.compareTo("vnd.android.cursor.item/radio") == 0) {
- // 'Radio channel' search mode
- playRadioChannel(album, artist, genre, rchannel, title);
-
} else if (mediaFocus.compareTo(MediaStore.Audio.Playlists.ENTRY_CONTENT_TYPE) == 0) {
// 'Playlist' search mode
playPlaylist(album, artist, genre, playlist, title);