I am wondering how to save an audio file in Xamarin forms. I can get the location where to save to AppDataDirectory using Xamarin.Essentials:
var mainDir = FileSystem.AppDataDirectory;
But I am not sure how to save it in code, right after recording it using the NateRickard AudioRecorder Plugin:
var recordTask = await recorder.StartRecording(); var audioFile = await recordTastk;
Its same as saving/creating any binary file in C#? Say its same as saving an image file? And additionally do I need to use Dependency Injection to save it using platform specific code, or I can manage to only do it from the PCL code?