簡體   English   中英

如何在 Xamarin Forms 中使用相機拍攝多張照片?

[英]How to take multiple pictures using camera in Xamarin Forms?

我有一個應用程序,我需要通過手機相機一次拍攝多張圖像。 用戶不想一次又一次地打開相機。

我也嘗試過https://github.com/jamesmontemagno/MediaPlugin插件,但它不支持連續圖像捕獲。 它一次單擊一個圖像。

有沒有辦法實現這種行為?

謝謝

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.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM