Cannot create files on Android with Xamarin

后端 未结 5 917
春和景丽
春和景丽 2020-12-19 00:38

I have a Xamarin-Studio App for Android and I simply want to download files and save them locally. But when I try to create a file in the files folder I get an

5条回答
  •  半阙折子戏
    2020-12-19 01:37

    You should use Environment or IsolatedStorage. For example:

    var path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
    var filename = Path.Combine(path, "newFile.png");
    

提交回复
热议问题