dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.85k stars 1.68k forks source link

FilePicker.PickMultipleAsync Does not work on Xiaomi phones, still can only select one, not multiple #18998

Open cnchenkg opened 7 months ago

cnchenkg commented 7 months ago

This my code

FileTypes = new FilePickerFileType(new Dictionary<DevicePlatform, IEnumerable<string>>() {  
            { DevicePlatform.Android, new[] { "text/plain" } },
        { DevicePlatform.WinUI, new[] { ".txt" } },}),
    };
    try
    {
       var result = await FilePicker.PickMultipleAsync(options);

        if (result != null)
        {
           AddItems(result);
        }

    }

When I start selecting, I should be able to select multiple options, but the file browser only allows me to select one

drasticactions commented 7 months ago

Not having a Xiaomi device, I can't test this directly, but have you tried holding down on an item to select it? I believe that's the behavior to enable multiple selections within file pickers, where you then can select multiple items.

ghost commented 7 months ago

Hi @cnchenkg. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

cnchenkg commented 7 months ago

Not having a Xiaomi device, I can't test this directly, but have you tried holding down on an item to select it? I believe that's the behavior to enable multiple selections within file pickers, where you then can select multiple items.

Yes, I tried, it didn't work on Xiaomi devices, in addition I succeeded on the android emulator of VS2022, it can be seen that it should just not work properly on Xiaomi devices, because it is a MIUI system and not a native Android system, and when it is called, it is the MIUI file manager of the device system to select. 屏幕截图 2023-11-24 212250