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

When calling PickFile unexpected apps are included as the source starting in Android API 29

Closed this issue · 5 comments

Expected Behavior

In a Xamarin.Android project when PickFile is called, the user should be immediately presented with the file picker. The "Open From" option in the hamburger menu should include all file sources (Dropbox, other apps).

Actual Behavior

When PickFile is called, the user is presented with a selection of what app to use (Files is there but then random other options for example Podcast apps). When the files app is selected, not all sources are included in the "Open From" menu (Dropbox being the most notably absent).

This started immediately after we changed our Target Android version to API level 29. Prior everything was working as in the Expected Behavior section

Specifications

  • NuGet package version: v2.1.41
  • Platform(s): Xamarin Android 10.0 API 29

Do you have a screenshot of that behavior?

screenshot_20200828-104310
Here is the shot of what I see when I call PickFile

screenshot_20200828-104339_2
Here is what I see in the resulting file selection activity when I select Files

If it is helpful, this is the exact line of code I am using to call out to the Filepicker in a Xamarin Android Fragment:
using (FileData fileData = await CrossFilePicker.Current.PickFile(new string[] { "image/jpg", "image/jpeg", "image/png" })) {

It seems you have two apps on your phone that answer to the ACTION_OPEN_DOCUMENT intent. What is "Pocket Ca..."? My guess is that when you uninstall that app, the first screenshot doesn't appear anymore. I don't know how to control what "app" is called to pick a file, though...

It's a podcast app which doesn't make sense. The issue I'm reporting however is that this behavior changed upgrading my API version to 29.

If I install a build that was compiled against an earlier API version it works as expected.

Closing this since this project will retire, please check out Xamarin.Essentials which now has a FilePicker based on this one.