How to open a local file with Xamarin?

1

Using Xamarin with Visual Studio and C #, I made an Android application and I'm creating a player using VideoView .

I would like to know how to access the mobile folder containing the video.

For example: "/storage/pasta/video.mp4" .

I know it's something with .SetVideoPath of VideoView , but I did not understand how.

    
asked by anonymous 16.12.2016 / 20:26

1 answer

2

Ronaldo, I do not understand if this is what you want, but when I have to access a certain folder I use the following code:

var documentsPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonVideos);
        var filePath = System.IO.Path.Combine(documentsPath, filename);

Now with filePath I already have the path to be accessed (in the case of the default video folder).

See if the Working with Files link helps you.

    
24.01.2017 / 16:54