Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
niravtopsy opened this issue Aug 4, 2021 · 0 comments

Comments

@niravtopsy
Copy link

niravtopsy commented Aug 4, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant