https://kotlinlang.org logo
c

Chris Fillmore

09/22/2022, 5:28 PM
I’m having an issue with loading images via Coil
AsyncImage
where
data
is a
File
, after upgrading to Android 13 (the issue does not repro on Android 12). These images don’t load anymore. Images which load from URI strings still load correctly. Anyone encountered something like this? Thanks in advance. Tested Coil v 2.2.0 and 2.2.1
Also Compose v
1.3.0-beta02
c

Colton Idle

09/23/2022, 2:51 AM
problem in compose it seems? https://github.com/coil-kt/coil/issues/1473
c

Chris Fillmore

09/23/2022, 2:50 PM
Thanks for the tip!
But I think I have this issue in `beta02`… let me double check
Yeah I have a different issue. Specifically: • Only happens on Android 13 • Only happens with
File
• Happens on Compose
1.3.0-beta02
At first I thought my issue was permissions related (new granular media permissions in Android 13), but making changes there hasn’t had the impact I expected. I’m still troubleshooting.
c

Colton Idle

09/23/2022, 6:28 PM
Cc: @Colin White?
c

Chris Fillmore

09/23/2022, 6:29 PM
Before I go troubling anyone, I am almost certain this is permission related on my end
I think I’m getting to the bottom of it right this moment…. plz hold
Ok yep I fixed it. I had a dodgy permissions check in there, for
WRITE_EXTERNAL_STORAGE
, the behaviour of which has evidently changed from Android 12-13
That permission is only needed for SDK 29 and under, but I was missing the check for that in the actual code
c

Colton Idle

09/23/2022, 6:35 PM
Idk if this is helpful but I did some storage stuff recently and this was awesome. Props to @yrezgui https://github.com/google/modernstorage
c

Chris Fillmore

09/23/2022, 6:36 PM
Thanks for the link, I’ll check it out!
Colton are you using Photo Picker?
c

Colton Idle

09/28/2022, 3:14 AM
yea
96 Views