Forum Cross Platform with Xamarin

Can't write txt file in Flash Drive Xamarin.Android / Xamarin.UWP

Hello guys,

I have some troubles.
It's about this subject =>

I don't know if I am in the right section.

I can't write a file in the root path (from the USB Flash Drive path) => /storage/[NameOfTheFlashDrive]

It's the same if I use the Android path => content://[NameOfTheFlashDrive]
Same message > System.UnauthorizedAccessException Access to the path

I don't know how to proceed.

I have used => File.WriteAllText(filePath, Data);

And I have the permissions to write file in external storage.

The only solution is to use Plugin.Essential or PickerFile and save manually in the correct path.

If someone have a idea to proceed with the right way.

Thank you.

Sign In or Register to comment.