jamesmontemagno/MediaPlugin

Don't ask the permission for access pictures and media when StoreCameraMediaOptions.SaveToAlbum is set false

evgeny1984 opened this issue · 1 comments

Bug Information

Version Number of Plugin: 2.4.1
Device Tested On: every device
Simulator Tested On: every simulator
Version of VS: 2019
Version of Xamarin: >5

Steps to reproduce the Behavior

  1. Try to take picture on the device using the MediaPlugin
  2. Two permission requests are fired: Camera, Access to pictures and media

Expected Behavior

I don't need the permission for media as I only take and save picture in the internal app directory, not device gallery. So only the camera permission is need to be requested if the SaveToAlbum property is set to false.

Actual Behavior

The permission request is fired, although the option SaveToAlbum is set to false.

Code snippet

var photo = await CrossMedia.Current.TakePhotoAsync(new StoreCameraMediaOptions
                {
                    Name = Guid.NewGuid().ToString(),
                    CompressionQuality = 50,
                    SaveMetaData = false,
                    SaveToAlbum = false,
                    DefaultCamera = CameraDevice.Rear
                });

                photoPath = photo.Path;

Please answer if it is planned to fix and when yes, when?

Thank you in advance for your help.

Pretty sure this was fixed already