media plugin to capture multiple image - android and ios black screen problem

I am calling the below function to capture multiple images from camera. its working but some times its coming black screen in both ios and android. Is there any way to solve this issue?

private async Task CaptureImage()
{
List fileList = new List();
try
{
bool isBlocked = true;
while (isBlocked)
{
MediaFile file1 = null;
file1 = await MediaPicker.TakePhotoAsync(new StoreCameraMediaOptions { SaveToAlbum = true, Name = "", Directory = "", CompressionQuality = 150 });

                        if (file1 == null)
                        {
                                isBlocked = false;
                        }
                        else
                        {
                                fileList.Add(file1);
                        }
                }
        }
        catch (Exception ex)
        {
        }

}

Sign In or Register to comment.