Friday, March 25, 2011

[android-developers]IllegalArgumentException with ContentResolver

Hi all,
In my application i'm having the following code
private static final String[] ANDROID_COLUMNS = {
AudioColumns.ARTIST_ID,
AudioColumns.TRACK,
AudioColumns.ARTIST,
AudioColumns.ALBUM_ID,
AudioColumns.ALBUM,
MediaColumns.TITLE,
AudioColumns.DURATION,
MediaColumns.DATA,
MediaColumns.SIZE,
MediaColumns.DATE_MODIFIED,
};


contentResolver.query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,ANDROID_COLUMNS,
AudioColumns.IS_MUSIC+ "<>0, null, null);

It's working fine but on some devices it throws
IllegalArgumentException.
Exception: java.lang.IllegalArgumentException
Stack Trace :

android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
144)

android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
114)

android.content.ContentProviderProxy.bulkQueryInternal(ContentProviderNative.java:
330)

android.content.ContentProviderProxy.query(ContentProviderNative.java:
366)
android.content.ContentResolver.query(ContentResolver.java:271)

Why this exception is thrown? If I catch this exception how can i
query the desired collection. Why this is happening only from time to
time ?
Thanks is advance.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate