You're specifying a null projection, which doesn't work for playlist
members.

On Mon, Jun 15, 2009 at 9:07 PM, Ondra Zahradnik
<[email protected]>wrote:

>
> Hello,
>
> I am trying to get members of music playlist by following query to
> content resolver on Android 1.5.
>
> Uri s = Uri.withAppendedPath(ContentUris.withAppendedId
> (Playlists.EXTERNAL_CONTENT_URI, id), Members.CONTENT_DIRECTORY);
> Cursor songsCursor = cr.query(s, new String[]{}, null, null, "");
>
> where "id" is id of existing playlist which I retrieve in previous
> step and uri in "s" looks like
>  content://media/external/audio/playlists/1/members
>
> This snippet fails on some NPE deep in MediaProvider.query(...) method
> as following stacktrace shows
>
> Writing exception to parcel
> java.lang.NullPointerException
>        at
> com.android.providers.media.MediaProvider.query(MediaProvider.java:
> 804)
>        at android.content.ContentProvider$Transport.bulkQuery
> (ContentProvider.java:112)
>        at android.content.ContentProviderNative.onTransact
> (ContentProviderNative.java:97)
>        at android.os.Binder.execTransact(Binder.java:287)
>        at dalvik.system.NativeStart.run(Native Method)
>
> I do similar thing with members of Genre and everything works as
> expected.
>
> I am about to fire bug do Android but I would like to be sure that
> nobody knows what can be wrong.
>
> Thank you.
>
> Ondra Zahradnik
> >
>

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

Reply via email to