Sample code for file-picker in Xamarin android

7.8k Views Asked by At

Can anyone show me how to implement a file-chooser/picker for Android using Mono?

Thanks in advance, Tery

2

There are 2 best solutions below

0
On BEST ANSWER

Would this sample work for you?

0
On

You can also use one of the Xamarin Plugin projects available as a NuGet package, if you want to support more platforms later. The currently most actively maintained package is this one: https://github.com/jfversluis/FilePicker-Plugin-for-Xamarin-and-Windows (note: I'm one of the contributors to the project).

Picking files is as easy as calling var result = await PickFile() and checking the result object. See also the sample code mentioned in the README.md of the Github project.