Hi,
I can't write or simply move a file stored on SD card. I have no exceptions
- reading/writing files on the phone storage
- reading files on the SD card
Certainly the permssions are present in the AndroidManifest.xml file
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
and they are given during runtime.
So everytime I try to write on SD card a "System.UnauthorizedAccessException: Access to the path is denied." is thrown.
You can reproduce it with this simple code
void MoveFile(string path)
{
string newpath = path + ".mp3";
System.IO.File.Move(path, newpath);
Console.WriteLine("----------------- File moved! ------------------".ToUpper());
}
Right after the System.IO.File.Move(path, newpath);
statement is thrown a System.UnauthorizedAccessException.