string rootPath = Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/FolderName";
if (!File.Exists(rootPath))
Directory.CreateDirectory(rootPath);
Above code suddenly stop to create folder.
Please give some suggestions.
Thanks.
string rootPath = Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/FolderName";
if (!File.Exists(rootPath))
Directory.CreateDirectory(rootPath);
Above code suddenly stop to create folder.
Please give some suggestions.
Thanks.
Hello,
Welcome to our Microsoft Q&A platform!
But you can write files or create folder in your application's path with following code.
string testPath= Android.App.Application.Context.GetExternalFilesDir("").AbsolutePath+ "/FolderName";
The new path is "/storage/emulated/0/Android/data/com.companyname.collectionviewdatatemple/files/FolderName"
Best Regards,
Leon Lu
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
@AnkushGupta-8648 May I know if you have got any chance to check my answer? I am glad to help if you have any other questions.
Hi @LeonLu-MSFT
I resolved this issue by change Target Android Version to Android 10.0.
Thanks for help.
7 people are following this question.