launching m3u playlist with intent

by Seb » Sun, 16 Aug 2009 21:11:31 GMT

Sponsored Links

Is there a way to launch a playlist whith intent?

I can retrieve the path of the m3u playlist with:
Cursor cursor = context.getContentResolver().query
(MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI, null, null, null,

But, I can't launch this m3u file neither with Intent nor with

Is there a way to do this?

Thanks in advance


launching m3u playlist with intent

by Marco Nelissen » Mon, 17 Aug 2009 03:23:56 GMT




Sponsored Links

launching m3u playlist with intent

by Marco Nelissen » Mon, 17 Aug 2009 03:30:16 GMT

 Well, OK, that's not entirely true. While you can't play an arbitrary
m3u file, you can play playlists that are in the database (which may
have come from m3u files originally, in which case there path is in
the _data column).
To see how, you can look at what happens when you put a shortcut to a
playlist on the home screen and then launch it.


launching m3u playlist with intent

by Seb » Mon, 17 Aug 2009 21:36:13 GMT

 Hi Marco,

Thank you very much for the response. You give me the key to find the

I had to study the code of PlaylistBrowserActivity to find the

I give it here if someone else search the solution:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setComponent(new ComponentName
intent.putExtra("oneshot", false);
intent.putExtra("playlist", playlistid);

and to retrieve the playlistid:
Cursor cursor = getContentResolver().query
(MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI, null, null, null,
if (cursor != null) {
 if (cursor.moveToFirst()) {
  do {
     playlistid = cursor.getString(cursor.getColumnIndex
     } while (cursor.moveToNext());


launching m3u playlist with intent

by » Fri, 11 Sep 2009 16:12:32 GMT

 Awesome. I love you! :)
This was just what I was looking for.


Other Threads

1. Unlock KeyGuard

hi guys,

i'm having three different devices. Tattoo,Milestone and a Droid. what
my application does is when receiving a call i'm starting a activity.
which works fine in all three. but if the phone is locked in Motorola
Droid it's not unlocking the screen in other two phones it's working

this is how am doing it

in the activity

                context = getApplicationContext();

and in the manifest


any suggestions.??



2. Froyo still breaks compatibility

You can no longer send the ACTION_ATTACH_DATA intent with an image URI
to a custom content provider without crashing the Gallery app.

This bug was reported more than a month ago.  It is a stupid
bug that is super easy to fix, and as soon as Froyo was open sourced a
patch was submitted. Still Froyo was officially released and the bug
remains leaving developers who use this with an app that is no longer
compatible and no easy way to work around it for 2.2.

There are other bugs that also have not been acknowledged. This 'open'
thing is great but it is not of much use this way.


3. Mod: Mohon Masukan dari Developer Android

4. X10i Latest Update dari S

5. opencore test apps are broken

6. java.lang.NullPointerException when trying to edit strings.xml

7. How to access a AIDL service from different packages?