title: How to launch a playlist in any music app
body: <p>I have the following code which works for Google Play Music, partly for Poweramp, not at all for stock music player</p>
  
  <pre><code>  public void playSelectedPlaylist(String plid) {
      Intent intent = new Intent( MediaStore.INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH);
      intent.putExtra(MediaStore.Audio.Playlists.ENTRY_CONTENT_TYPE,
              "android.intent.extra.playlist" );
      intent.putExtra(MediaStore.EXTRA_MEDIA_FOCUS, "vnd.android.cursor.item/playlist");
      intent.putExtra(SearchManager.QUERY, plid);
  
  
      if (intent.resolveActivity(getPackageManager()) != null) {
          startActivity(intent);
      }else{
          doToast("Sorry, no app was found to service this request", context);
      }
  }
  </code></pre>
  
  <p>The intent is INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH and it finds all those apps that have this in their manifest.xml file. So far so good. However, some of these are not really suitable for mp3 playlists such as Youtube.</p>
  
  <p>Question 1: 
  How can I return just music players. (the MUSIC_PLAYER activity has been deprecated so I need to use seomething else)</p>
  
  <p>Question 2:
  when  executing the above code Poweramp does present the user with the appropriate playlist. When clicking this and select "Play" nothing happens other than Poweramp asking me if I want to play filtered or play all. Selecting either has no effect. 
  Finally the question, why does Poweramp not play the playlist?</p>
  
  <p>Additional:
  the reason why the stock music player does not show is because it does not have the INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH. (I assume this will change in later versions)
  Google Play Music has no problem and happily loads and starts to play the playlist
  My Samsung has another music player which loads but seems unable to recognise it is a playlist I am passing and does not find anything although the playlist exists.</p>
  
  <p>Anyone with suggestions, thoughts/suggestions I can try out?</p>