Skip to content

ArtjomP/FilePicker-Plugin-for-Xamarin-and-Windows

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FilePicker Plugin for Xamarin.Forms

Simple cross-platform plug-in that allows you to pick files from the filesystem (iCloud drive in case of iOS) and work with them.

Setup

NuGet version

  • Available on NuGet: FilePicker Nuget
  • Install into your Xamarin.Android, Xamarin.iOS, Xamarin.Forms, Xamarin.Mac project and Client projects.

Platform Support

Platform Supported Version Remarks
Xamarin.iOS Yes iOS 6+
Xamarin.iOS Unified Yes iOS 6+
Xamarin.Android Yes API 10+
Windows Phone Silverlight No
Windows Phone RT Yes 8.1+ Up to package version 1.3.x
Windows Store RT Yes 8.1+ Up to package version 1.3.x
Windows 10 UWP Yes 10+
Xamarin.Mac Yes * 10.12+

* The Xamarin.Mac implementaiton has only been tested on MacOS 10.12.

API Usage

Call CrossFilePicker.Current from any platform or .NET Standard project to gain access to APIs.

Example

        try
        {
            FileData fileData = await CrossFilePicker.Current.PickFile();
            string fileName = fileData.FileName;
            string contents = System.Text.Encoding.UTF8.GetString(fileData.DataArray);

            System.Console.WriteLine("File name chosen: " + fileName);
            System.Console.WriteLine("File data: " + contents);

        }
        catch (Exception e)
        {
            System.Console.WriteLine("Exception choosing file: " + e.ToString());
        }

IMPORTANT

Android: The WRITE_EXTERNAL_STORAGE & READ_EXTERNAL_STORAGE permissions are required.

iOS: Need Configure iCloud Driver for your app

Contributors

Thanks!

License

Licensed under main repo license

About

FilePicker Plugin for Xamarin and Windows

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%