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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×