-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
Fix downloads not working below Android Q by properly requesting storage permissions #91
Conversation
Oh that's dumb, I didn't think using the download manager requires storage permissions. I originally added the Regardless, only declaring the permission isn't enough on Android M and above, we need another permission prompt. |
So the proper fix is to check if the permission is granted when the download button is pressed and if it's not, ask for it first? I can do that |
Yep, but only below Android Q. |
cfffa92
to
75f2943
Compare
75f2943
to
0b9dc23
Compare
Redid the PR to actually requets the permission. |
app/src/main/java/org/jellyfin/mobile/utils/PermissionRequestHelper.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/jellyfin/mobile/utils/PermissionRequestHelper.kt
Outdated
Show resolved
Hide resolved
Use typealias for callback, use SparseArray instead of Map for callback storage, make request code generation atomic
Set timeout for permission acceptance, ensure dialog coroutine always finishes (by adding a dismiss listener)
I can't approve since I opened the PR but your changes look good to me @Maxr1998 |
Fixes #72