Awesome. I love you! :) This was just what I was looking for. On Aug 17, 2:36 pm, Seb <[email protected]> wrote: > Hi Marco, > > Thank you very much for the response. You give me the key to find the > solution. > > I had to study the code of PlaylistBrowserActivity to find the > solution. > > I give it here if someone else search the solution: > Intent intent = new Intent(Intent.ACTION_VIEW); > intent.setComponent(new ComponentName > ("com.android.music","com.android.music.PlaylistBrowserActivity")); > intent.setType(MediaStore.Audio.Playlists.CONTENT_TYPE); > intent.setFlags(0x10000000); > intent.putExtra("oneshot", false); > intent.putExtra("playlist", playlistid); > startActivity(intent); > > and to retrieve the playlistid: > Cursor cursor = getContentResolver().query > (MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI, null, null, null, > null); > if (cursor != null) { > if (cursor.moveToFirst()) { > do { > playlistid = cursor.getString(cursor.getColumnIndex > (MediaStore.Audio.Playlists._ID)); > playList.add(playlist); > } while (cursor.moveToNext()); > cursor.close(); > } > > } > > On 16 août, 21:29, Marco Nelissen <[email protected]> wrote: > > > 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 > >playliston the home screen and then launch it. > > > On Sun, Aug 16, 2009 at 12:21 PM, Marco Nelissen<[email protected]> wrote: > > > On Sun, Aug 16, 2009 at 6:11 AM, Seb<[email protected]> wrote: > > > >> Hi, > > > >> Is there a way to launch aplaylistwhith intent? > > > > No. > > > >> I can retrieve the path of the m3uplaylistwith: > > >> Cursor cursor = context.getContentResolver().query > > >> (MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI, null, null, null, > > >> null); > > >> cursor.getString(cursor.getColumnIndex > > >> (MediaStore.Audio.Playlists.DATA)); > > > >> But, I can't launch this m3u file neither with Intent nor with > > >> MediaPlayer. > > > >> Is there a way to do this? > > > >> Thanks in advance --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

