Permission acces filesystem after last App Inventor Update API Level 33

When I compile an App, that access to external file system and that I could compile and use without any problems before the last App Inventor Update (Api Level 33) I cannot acces to the file system anymore: "Error 908: The permission READ_EXTERNAL_STORAGE has been denied. Please enable it ind Settings app."
Any idea how to solve this? Strangely enough, in the App settings is no possibility to choose read permission to external storage.
With Companion, the app works fine.

Which component are you using to read the file, and what type of file is it?

Please provide a screenshot of your relevant blocks. Also which device and Android version are you using for your tests?

Taifun

I think the problems are caused by this block:

I use a Google Pixel 6 pro with Android 13 (GrapheneOS) for testing.

How about answering @ewpatton's questions? And show your relevant blocks.

You forgot to provide these blocks

Taifun

Sorry for my late response. It was not so easy to find all relevant blocks.

On Android 13+ there is no longer READ_EXTERNAL_STORAGE since targetSdkVersion=33. You now have to request separate permissions for images, videos and audio files:

  • READ_MEDIA_IMAGES
  • READ_MEDIA_AUDIO
  • READ_MEDIA_VIDEO

I added this also to my guide Some basics on Android storage system :

1 Like

Ah, okay. So I have to check the Android-Version and use READ_EXTERNAL_STORAGE if <13 and READ_MEDIA_VIDEO and READ_MEDIA_IMAGES if >=13. Right?

Correct, see also here:

Your question has nothing to do with the topic. Move it to another topic.

Okay, I'll try this. Thanks a lot!!!

1 Like