I'm trying write to a text file with my function which works fine on Windows Machine but doesn't create the txt file on Android.
public async void WriteTextToFile(string text, string targetFileName)
{
string targetFile = System.IO.Path.Combine(FileSystem.Current.AppDataDirectory, targetFileName + ".txt");
using FileStream outputStream = System.IO.File.OpenWrite(targetFile);
using StreamWriter streamWriter = new StreamWriter(outputStream);
await streamWriter.WriteAsync(text);
}