语言

Menu
Sites
Language
File or Directory creation with Xamarin.Forms

Hi !

 

I have tried to create a directory or file for my app specific files to download from our server.

The app is the Cross Platform of  tizen wear, android, iOS.

 

In the shared project, with the path of Environment.GetFolderPath(Environment.SpecialFolder.Personal )

the drived path can be easily obtained, accessed and created easily in all platform except for tizen.

 

The path of 

Tizen.Applications.Application.Current.DirectoryInfo.Data

was commented in the forum "Save file in Tizen with Xamarin.Forms" but 

Not easy to use it in my code.

 

In your downloader example of Tizen-CSharp-Samples-master,

DependencyService.Get<IDownload>().GetDownloadedPath() looks a proper path to download any file.

("/opt/usr/media/Downloads/Files.txt")

 

I need the downloaded files have to be kept for long enough my apps survives in the watch.

Please guide us how to create our own path in the Tizen Watch.

 

 

Thanks.

 

响应

1 回复
Tizen .NET

Hi,
Data directory is the proper path to save app's data and it is maintained along with the app's lifecycle.
(if you save files in media directory(virtual root), they won't be deleted even if your app is uninstalled.)
You can refer to sample apps such as AppInformation, WebProxySamplePlayerSample and so on to learn how to use it.
Please let us know if you still have any problem.