nt4f04uNd / sweyer

Music player built with Flutter
BSD 3-Clause "New" or "Revised" License
197 stars 47 forks source link

Use getContentUri on newer Android versions #141

Open Abestanis opened 2 months ago

Abestanis commented 2 months ago

This is an attempt to fix the java.lang.IllegalArgumentException: Volume external_primary not found that we see on Crashlytics ([1], [2], [3]).

I can't replicate the problem in an emulator, but I verified that we still query all media on the phone with these changes.

The is not much to find about this problem, except one StackOverflow post.

Google is still using the constant in their generic example

Generic example

But they use the getContentUri in the query the media collection example:

Query media collection example

nt4f04uNd commented 2 months ago

Can you please link the Crashlytics issues to the issues/PRs, so we can close them after the fix?

I don't see it in the console right now looking it up myself

Abestanis commented 2 months ago

Can you please link the Crashlytics issues to the issues/PRs, so we can close them after the fix?

I linked to the Crashlytics issues from the pull request description. I'm not sure how to link to this PR from the Crashlytics issue and Google is not telling me, do you know if that is possible?