Android API 29 and 30 move files from persistentDataPath
Android API 29 and 30 have set new rules for storage management. This means that the functions such as the following one doesn't work:
string galleryPath = Path.Combine("/storage/emulated/0/DCIM/FolderName/", fileName);
if(!System.IO.Directory.Exists(Path.GetDirectoryName(galleryPath)))
{
string newDir = Path.GetDirectoryName(galleryPath);
Directory.CreateDirectory(newDir);
}
System.IO.File.Move(path, galleryPath);
Any way to fix the issue? I'm using this in order to move screenshots from persistent storage to gallery.
Comment