Skip to content

Commit 5c93669

Browse files
committed
fix: Do not display unnecessary options in the Android file picker
1 parent 6ad28bc commit 5c93669

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/MauiBlazorToolkit/MauiBlazorToolkit/Essentials/AndroidFilePicker/AndroidFilePickerImplementation.android.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ public Task<IEnumerable<FileResult>> PickMultipleAsync(PickOptions? options = nu
1515
async Task<IEnumerable<FileResult>> PlatformPickAsync(PickOptions? options, bool allowMultiple = false)
1616
{
1717
// Essentials supports >= API 19 where this action is available
18-
var action = Intent.ActionGetContent;
18+
var action = Intent.ActionOpenDocument;
1919

2020
var intent = new Intent(action);
21+
intent.AddCategory(Intent.CategoryOpenable);
2122
intent.SetType(FileMimeTypes.All);
2223
intent.PutExtra(Intent.ExtraAllowMultiple, allowMultiple);
2324

0 commit comments

Comments
 (0)