How to take multiple pictures using camera in Xamarin Forms?

别来无恙 提交于 2020-05-27 10:48:05

问题


I have an application in which I have a requirement to take multiple images in one shot by phone camera. User don't want to open camera again and again.

I have tried https://github.com/jamesmontemagno/MediaPlugin Plugin also but it do not support continuous Images capturing. It clicks one image at a time.

Is there a way to achieve this behaviour?

Thanks


回答1:


Can you try this in media plugin
for (int i = 0; i < 3; i++)
{

                            file = await MediaPicker.TakePhotoAsync(new StoreCameraMediaOptions { SaveToAlbum = true, Name = "", Directory = "" });
                            if (file != null)
{
//code to save
}

The user can press cancel at anytime to stop taking pictures, and it'll hit the return and stop running the code. But its ran the logic to save the images each time a photo has been taken.


来源:https://stackoverflow.com/questions/53039177/how-to-take-multiple-pictures-using-camera-in-xamarin-forms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!