Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image Picker Order (Android only) #907

Open
shailensukul opened this issue Nov 20, 2020 · 1 comment
Open

Image Picker Order (Android only) #907

shailensukul opened this issue Nov 20, 2020 · 1 comment

Comments

@shailensukul
Copy link

shailensukul commented Nov 20, 2020

Bug Information

Version Number of Plugin: 5.0.1
Device Tested On: Pixel 3a
Simulator Tested On: Pixel 2 Pie 9.0 (Android 9.0 - API 28)
Version of VS: 2019 16.7.7
Version of Xamarin: 16.7.000.463

Steps to reproduce the Behavior

  1. Open app
  2. Go to image picker
  3. Pick multiple images in order
  4. Check the files returned by the picker
  5. They are not in the order selected

Expected Behavior

Files should be returned in the order selected

Actual Behavior

Files seem to be in random order

Code snippet

private async Task<StockGalleryPickerSet> PickImagesAsync(CancellationToken cancellation)
        {
            await CrossMedia.Current.Initialize();
            if (CrossMedia.Current.IsPickPhotoSupported)
            {
                var mediaOption = new PickMediaOptions
                {
                    PhotoSize = PhotoSize.MaxWidthHeight,
                    CompressionQuality = 92,
                    MaxWidthHeight = 1920
                };

                var multiPickOptions = new MultiPickerOptions 
                { 
                    MaximumImagesCount = 100
                };

                var files = await CrossMedia.Current.PickPhotosAsync(mediaOption, multiPickOptions, cancellation);
                if (files != null)
                {
                    
                    var mapped = from file in files
                                 select new StockGalleryPickerMediaFile(file.Path, file.GetStreamWithImageRotatedForExternalStorage);
                    var results = new StockGalleryPickerSet()
                    {
                        Items = mapped.ToList()
                    };

                    return results;
                }
            }

            return null;
        } 

Screenshots

image

@178884875
Copy link

This is just multiple selection without sequence, or the sequence is the sequence of pictures rather than the sequence of selection. For example, the disordered effect of realizing the sequence of pictures with selection serial numbers rather than checklists should be realized manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants