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. automatically accessing wireless networks which require individual login/pass

To access the wireless at my university the network is 'open' but you
have to sign in (personal user name and pass) via a login webpage
prior to actually being connected to the wifi. It's kind of annoying
to have to do this every time instead of the phone just connecting to
the network.

So two options that I am wondering would be possible:

1. best case, somehow it can automatically sign into the network once
it is detected (e.g. run a script which enters login/pass to webpage)

2. at least have the user name and pass remembered (i cant figure out
how to have it remember logins).

Any help would be great, #2 should be possible I just haven't figured
it out yet; #1 maybe not but I hope that would be super sweet! Thanks!

**I should note, I have disabled cell tower data transfer (reason I
bought the nexus one so I didn't have to pay $30 a month when wifi is
everywhere!). So accessing wifi is the only way I get data connection;
hence the importance of directly/automatically connecting

***Here is a link to a forum where it looks like someone presents a
solution for a computer; I'm not sure if this can be extended to the
N1:
http://forums.macosxhints.com/showthread.php?t=105306

-- 

2. how to define scrollbar's thumb Drawables from java code?

setScrollIndicators(up, down) is this what you are looking for its in View.




> 

3. is there any1 who has implemented facebook integration with android app by any means ??? plz help

4. how to track all http/https requests

5. Dear Mark Deloura

6. Android handset quality

7. Activity Exit Animation