Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

How to get data files folder in Xamarin.Forms

$
0
0

Hello,

I need to show a video file in Xamarin.Forms. I have placed the MP4 file in \Internal storage\Android\data\com.mycompany.MyApp\files\Videos

Then, I tried to access it using:

string videoPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyVideos), this.viewModel.Item.Video)

But videoPath variable contains "/data/data/com.desytec.FinningApp/files/Videos/777.mp4" .

Then, I am checking file existence:

bool existing = System.IO.File.Exists(videoPath);

But "existing" returns false. I tried by changing the first "/data" to "/Android" but the file is not found either.

Any help, please?

Thanks
Jaime


Viewing all articles
Browse latest Browse all 89864

Trending Articles