Android intent to start a playlist

24 views
Skip to first unread message

Dhaval Nagar

unread,
May 18, 2015, 3:48:08 PM5/18/15
to rhapso...@googlegroups.com
Hi,

I want to start a Rhapsody playlist from another application, but not able to figure out the exact Intent to send make it work.
Any help is appreciated.

regards,
Dhaval

Dhaval Nagar

unread,
May 19, 2015, 2:03:14 AM5/19/15
to rhapso...@googlegroups.com
Hi,

I figured out the solution with the help of a Redditor.

String playlistId = ""; // ... get your playlist id
String uri = "rhap:///?action=view&id=" + playlistId;
Intent launcher = new Intent( Intent.ACTION_VIEW, Uri.parse(uri) );
launcher.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(launcher);

The above code will open the Rhapsody app and start playing the playlist.

Thanks,
Dhaval
Reply all
Reply to author
Forward
0 new messages