I am using SQLite (via the "sqlite-net-pcl" nuget package) within a Xamarin Forms application running on various versions of Android.
I need to make the database file available for download to a PC (even if only when in debug mode) for diagnostics purposes, but it seems whichever Android folder I place it in I can never find it afterward.
I am (by default) placing the file in...
System.IO.Path.Combine(Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "database.db")
Note that in the above I am using the Mono libraries not the Android libraries to find the folder.
I have tried most of the "Environment.SpecialFolder" options, what I would like ideally is a way to determine the path to the "Downloads" folder that is available when browsing to the device from the PC over USB (This PC\MyDevice\Internal shared storage\Download) but I just cannot find a way to determine where that folder is located across different devices and Android versions.
Can somebody please tell me how to get the path to that "Downloads" folder, or even how to get to the parent of that folder so that I can create my own subfolder? I suspect that I will need to be using the Android.OS.Environment.DirectoryDownloads or similar but I just do not seem to be able to get that right.
Thanks.