Re: [android-developers] Retrieve music playlists in user's device

2016-10-17 Thread Van Nguyen
Hi,

Will appreciate any thought on this as I have tried this

'String[] proj = {"*"};

ContentResolver resolver = context.getContentResolver();
Uri tempPlaylistURI = MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI;

Cursor c= resolver.query(tempPlaylistURI, null, null,null,null);
Log.d("PLAYLIST COUNT", "PLAYLIST COUNT=" + c.getCount());
if(c!=null && c.moveToFirst()) {
do {
String plName =
c.getString(c.getColumnIndex(MediaStore.Audio.Playlists.NAME));
Log.d("PLAYLIST", "PLAYLIST NAME " + plName);
} while (c.moveToNext());
}


and it doesn't work but that doesn't make sense as this has been done in a
lot of people's code and just didn't work when I tried while plugging in my
device. My target platform is KitKat. This code always gives me 0 playlists.



Thank you.

On Mon, Oct 17, 2016 at 12:04 AM, Van Nguyen  wrote:

> Hi, sorry if this sounds too amateurish, I have been searching for a way
> to retrieve user-created music playlists in Android devices to no avail.
> Is this feature available? I didn't find it on the API.
> My app looks for user's songs and create a player to play them, instead of
> the device's own player. So it is just another Activity inside my app. I
> need to keep it inside my app.
> I can play the songs, but I can't get the playlists that were created by
> users.
>
> Thank you so much!
>
>
> Van
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/android-developers/KrxK87u2hgY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to android-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/android-developers/8a475e6e-75ce-40b9-968a-
> f4f3017a57fc%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CAA5dqmKsz%3D%3DzuVkXPdSG7mS3QoQtfqsfHsecoRa9jccqmyxU-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Retrieve music playlists in user's device

2016-10-16 Thread Van Nguyen
Hi, sorry if this sounds too amateurish, I have been searching for a way to 
retrieve user-created music playlists in Android devices to no avail.
Is this feature available? I didn't find it on the API.
My app looks for user's songs and create a player to play them, instead of 
the device's own player. So it is just another Activity inside my app. I 
need to keep it inside my app.
I can play the songs, but I can't get the playlists that were created by 
users.

Thank you so much!


Van

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/8a475e6e-75ce-40b9-968a-f4f3017a57fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.