【问题标题】:How to take multiple pictures using camera in Xamarin Forms?如何在 Xamarin Forms 中使用相机拍摄多张照片?
【发布时间】:2018-10-29 13:27:41
【问题描述】:

我有一个应用程序,我需要通过手机摄像头一次拍摄多张图像。用户不想一次又一次地打开相机。

我也尝试过https://github.com/jamesmontemagno/MediaPlugin 插件,但它不支持连续图像捕获。它一次点击一张图片。

有没有办法实现这种行为?

谢谢

【问题讨论】:

    标签: c# xamarin xamarin.forms


    【解决方案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.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-20
      • 2015-07-17
      • 1970-01-01
      • 2013-11-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多