Forum Xamarin.Forms

Saving files in an Android device and then load in Xamarin.Forms application

jstuardojstuardo Member ✭✭
edited July 2019 in Xamarin.Forms


When browsing an android device, I see that my application was deployed at "\Internal storage\Android\data\\files.__override__"

Using that folder, I have created the folder "\Internal storage\Android\data\\files\Videos" and placed a file in it.

On the other hand, I have this code in a xaml.cs file (in the platform independent project):

string videoPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyVideos), "video.mp4"); bool existing = System.IO.File.Exists(videoPath);

One strange thing is that, "videoPath" contains this folder:"/data/data/com.desytec.FinningApp/files/Videos/video.mp4".

What is "/data/data" folder part all about? I would expect it to be "/Android/data/com.desytec.FinningApp/files/Videos".

Well, but it seems neither folder is correct, since if I used both paths, file never is found.

Can you help me to point to the right folder, please?

I have even created the full path "/data/data/" in device but no avail.




Sign In or Register to comment.