• Announcements

    • andrewilley

      Poweramp v3 Beta-test Build 790 Now Released   04/29/2018

      Poweramp v3 BETA TEST preview build 790, including brand new user interface, has now been released - 30 April 2018. This is not quite feature-complete yet, so only install if you are happy to test with a slightly reduced set of options.  Missing features should be completed during May. Please report any issues in the testing forum thread, and remember to backup your previous build before testing.  
flyingdutchman

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

4 posts in this topic

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