Forum Xamarin Xamarin.Android

What is Xamarin / C# equivalent of Context.MODE_PRIVATE

MartHughMartHugh USMember ✭✭✭

According to this reference
https://developer.android.com/guide/topics/data/data-storage.html#filesInternal

Files can be saved and accessed privately, i.e. no other app or user has access, by using the flag Context.MODE_PRIVATE when opening the filestream.

How can I achieve the same under Xamarin / C#

There seem to be plenty of examples which get the path from Environment.SpecialFolder.Personal

string path = Environment.GetFolderPath (Environment.SpecialFolder.Personal);

But I cannot see any documentation which states that this data is private to the app. In fact there are plenty of anecdotal posts which suggest that it is the same enum as SpecialFolder.MyDocuments.

Can anyone advise how I can write to internal storage which is private to the App.

Many thanks

Answers

Sign In or Register to comment.