jamesmontemagno/MediaPlugin

Is there away to remove selected photos (Select Photos..) from permissions dialog? / Funny permission issues

jsuske1985 opened this issue · 1 comments

Hi All,

I was wondering if there is away to remove the selected photos (Select Photos..) from the permissions dialog and just have Allow Access to All Photos and Don't Allow?

Here is my code:

if (!CrossMedia.Current.IsPickPhotoSupported)
                {
                    await DisplayAlert("Photos Not Supported", "Sorry! Permission not granted to photos.", "OK");
                    return;
                }

                MediaFile file = null;

                if (await Permissions.RequestAsync<Permissions.Photos>() == Xamarin.Essentials.PermissionStatus.Granted)
                {
                    file = await Plugin.Media.CrossMedia.Current.PickPhotoAsync(new Plugin.Media.Abstractions.PickMediaOptions
                    {
                        PhotoSize = Plugin.Media.Abstractions.PhotoSize.Medium,

                    });
                }

                if (file == null)
                    return;

                var imageSource = ImageSource.FromStream(() =>
                {
                    var stream = file.GetStream();
                    return stream;
                });

                PickImage.Source = imageSource;

Is this even possible? I also notice when I do select "Select Photos..." And then select the photos that i am allowing the app to use, the library comes up again and I am allow to select any photo I want, even the ones I did not select the first time around.

No, this is iOS doing it