MultipleImageSelect icon indicating copy to clipboard operation
MultipleImageSelect copied to clipboard

Fatal Exception: java.lang.IllegalArgumentException Volume external_primary not found

Open niravtopsy opened this issue 4 years ago • 0 comments

Hello,

I am getting following issue after i change my target version to 30 (older version is 29),

com.kolonishare.AlbumSelectActivity$AlbumLoaderRunnable.run (AlbumSelectActivity.java:248) java.lang.Thread.run (Thread.java:923)

Issue in following code :

  Cursor cursor = getApplicationContext().getContentResolver()
                .query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, projection,
                        null, null, MediaStore.Images.Media.DATE_ADDED);
                        

I tried with following code but it not help me. (by using MediaStore.VOLUME_EXTERNAL_PRIMARY)

  Cursor cursor = getApplicationContext().getContentResolver()
                .query(MediaStore.Images.Media.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY), projection,
                        null, null, MediaStore.Images.Media.DATE_ADDED);
                        

Please can you update your code after solving this issue.

niravtopsy avatar Aug 04 '21 05:08 niravtopsy