Android 11 scoped storage/SAF support

Hello, I'm the developer of M64Plus FZ. I have been getting a good amount of bug reports about my app not working correctly in Android 11 with Dig. From investigating the issue, it seems that Dig is providing the app with a file path. When my app tries to load this file in Android, it gets a "permission denied" error.

This is happening because I'm currently targeting my app against the Android API level 30, if an app targets that API level, it can no longer use file paths provided externally. Instead, the only "path" that works when provided externally, are URIs gathered through the storage access framework (SAF), as long as my app has been provided access to the same file at some point.

Unfortunately, the only way to fix this is for Dig to use the SAF file browser to find files. Files will then be in the form of URIs that M64Plus FZ can handle in Android 11.

This is going to be something that is going to be required soon to publish updates in the play store, so it seems like the only reasonable path forward for now.

This is not an issue in Android 10 or earlier because I'm using the requestLegacyExternalStorage flag in my application manifest, so Android still lets me handle the old path style.

Sign In or Register to comment.