I want to implement functionality that allows an Android user to write a file to their devices SD card and have the ability to pop that SD card into a different device and access the file from the new device - in case their original device is damaged and no longer usable.
I'm able to write to the SD card, getting the path like so:
Java.IO.File[] externalFilesDirs = Android.App.Application.Context.GetExternalFilesDirs(null);
if (externalFilesDirs.Any())
{
string externalSdPath = externalFilesDirs.Length > 1 ? externalFilesDirs[1].AbsolutePath : externalFilesDirs[0].AbsolutePath;
}
However, this stores the file in an app-specific folder that I'm unable to access from another app, or the same app on a different device.
I'm targeting Android 11 and I know that scoped storage is the standard now, but is there any way to write to a non-app specific folder on the SD card or access the app-specific folder outside of the app that created it?