LeonidasFett
LeonidasFett

Reputation: 3132

Access folder throughout Xamarin app

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?

Upvotes: 2

Views: 1444

Answers (1)

Taier
Taier

Reputation: 2119

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

Upvotes: 4

Related Questions