2

Is there any folder that can be accessed through a Xamarin.Forms app? The app will be deployed to Android, iOS and as a UWP app. I have a database file and so far, I am using SpecialFolders.Personal, which works for Android and iOS, but not UWP. I would need to get permission for this folder in Windows.

So is there any folder I can use across all 3 devices for which I don't need any special permissions?

LeonidasFett
  • 3,052
  • 4
  • 46
  • 76

1 Answers1

4

Xamarin.Forms has provided Environment.SpecialFolder.LocalApplicationData enum that use to get universal storage path. And it need to be combined with Environment.GetFolderPath method.

var ApplicationDataPath = Environment.GetFolderPath(SpecialFolder.LocalApplicationData); 

For more please refer File Handling in Xamarin.Forms

Nico Zhu
  • 32,367
  • 2
  • 15
  • 36
Taier
  • 2,109
  • 12
  • 22