private void SavetoSd() { var sdCardPath = Android.OS.Environment.ExternalStorageDirectory.Path; var filePath = System.IO.Path.Combine(sdCardPath, "iootext.txt"); if (!System.IO.File.Exists(filePath)) { using(System.IO.StreamWriter write = new System.IO.StreamWriter(filePath,true)) { write.Write(etSipServer.ToString()); } } }
System.UnauthorizedAccessException: Access to the path "/mnt/sdcard/iootext.txt" is denied.
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)