Jump to content
Poweramp
flyingdutchman

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

Recommended Posts

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...