launching m3u playlist with intent

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


Sponsored Links
 Hi,

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,
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


--~--~---------~--~----~------------~-------~--~----~



launching m3u playlist with intent

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


 


No.


--~--~---------~--~----~------------~-------~--~----~


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
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();
 }
}







--~--~---------~--~----~------------~-------~--~----~



launching m3u playlist with intent

by hav...@gmail.com » Fri, 11 Sep 2009 16:12:32 GMT


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







--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Is there some plan to support USAT for 3G

Hi there,

I have seen on the cupcake roadmap that the release includes a SIM application 
toolkit (STK) :

    " This feature will enable the SIM to initiate actions for various 
operator-specific value-added services. "

        1.     http://source.android.com/roadmap
        2.     http://source.android.com/roadmap/cupcake
Is there any plan to support USAT (USIM Application
Toolkit), the SIM Application Toolkit for 3G (commonly referred to as STK).

My target is to use a Generic Bootstrapping Architecture (GBA) for a network 
authentification.

 
SIM Application Toolkit (commonly referred to as STK) :
            http://en.wikipedia.org/wiki/SIM_Application_Toolkit
            http://bladox.com/devel-docs/gen_stk.html
            http://en.wikipedia.org/wiki/USIM_Application_Toolkit
 
USAT (USIM Application
Toolkit) :
3GPP TS 31.111 Universal
Subscriber Identity Module (USIM) Application Toolkit (USAT)

http://www.3gpp.org/ftp/Specs/html-info/31111.htm
 
Thanks ins advance for your reply.

Best regards


Thierry GAYET
NextInnovation.org
+33(0)663.849.589


      
--~--~---------~--~----~------------~-------~--~----~

2. Notepad tutorial and the case of the missing setListAdapter() method

I am working through the Notepad tutorial and am noticing my project
will not compile.

The last line of the fillData() method in the Notepadv1.java file
references this method.  I have searched unsuccessfully to find it.
Can someone provide me insight about where this method is so I can get
my project to compile?

Thanks

--~--~---------~--~----~------------~-------~--~----~

3. AChartEngine - a charting library for the Android platform

4. How can I install Hello world project to G1 phone? How can I install using Eclipse with ADT??

5. Is there an easy way to make EditText look like TextView but still behave like EditText?

6. Is there an easy way to make EditText look like TextView but still behave like EditText?

7. Multiline text input