Jump to content

How to launch Poweramp from another andoid app into playing an m3u playlist


flyingdutchman

Recommended Posts

  • 3 weeks later...
  • 1 year later...

I finally managed to get a Poweramp Playlist to be launched from within another app (New Playlist Manager).

For those interested:

public void playSelectedPlaylist(String playlist_id){

    Intent intent = new Intent(PowerampAPI.ACTION_API_COMMAND);
            intent.putExtra(PowerampAPI.COMMAND, PowerampAPI.Commands.OPEN_TO_PLAY)
                    .setData(PowerampAPI.ROOT_URI.buildUpon()
                    .appendEncodedPath("playlists")
                    .appendEncodedPath(playlist_id)
                    .appendEncodedPath("files")
                    .build());
    Intent explicit_intent = new Intent(createExplicitFromImplicitIntent(getActivity(), intent));
    getActivity().startService(explicit_intent);

}

The Poweramp library needs to be included.

ps. I have not shown the createExplicitFromImplicitIntent method but contact me if you want this.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...