I want to save some data to the storage (internal/external) of an Anroid device. I found this post where they got the external storage path with the following line:
var sdCardPath = Android.OS.Environment.ExternalStorageDirectory.Path;
Seems fair. But my Visual Studio says the following:
The name 'Android' does not exist in the current context
So I've been wondering in which namespace does this Android reside? I tried quite a lot (e.g. AutoImport, but that seems to give me the wrong parent; or pressing F1 for documentation like suggested here) but didnt figure out how to get this to work. Which NuGet- Package do I have to get to obtain this function. Or am I doing something completely wrong?
This is the namespace that AutoImport gives me:
Xamarin.Forms.PlatformConfiguration.Android.OS.Environment.ExternalStorageDirectory.Path;
but then it tells me that Android has no OS member. And upon checking, I found that Xamarin.Forms.PlatformConfiguration.Android has no members at all, so theres nothing beneath it. Is my Xamarin.Forms depricated? According to my NuGet- Packagemanager, everything is up to date.
These are the NuGet- Packages my project uses:
Xamarin.EssentialsXamarin.FormsOxyPlot.CoreOxyPlot.Xamarin.Forms