如何让用户在Cordova中从Gallery中选择或拍照 [英] How to let the user to choose from Gallery or take picture option in Cordova

查看:87
本文介绍了如何让用户在Cordova中从Gallery中选择或拍照的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让用户将照片添加到Cordova应用程序中,我想让用户从他的相册中选择照片或立即拍照。我该如何使用Cordova提供这样的选项。

I want to let the user to add a pic to the Cordova application and I would like to let the user to choose the pic from his albums or take a picture instantly. How do I provide such an option using Cordova.

Cordova是否提供了这样的功能,还是我们必须编写一个?请为我提供建议。

Does Cordova provide such a feature out of the box or we have to write one? Please advice me how to proceed with the requirement.

干杯!

推荐答案

非常感谢@GenieWanted& @ Sumn2u的回答,特别感谢@GenieWanted的时间和提供的扩展支持。

Thanks a lot @GenieWanted & @Sumn2u for your responses, special thanks to @GenieWanted for your time and extended support.

从以下问题据我了解,Cordova没有提供直接的解决方案来为用户提供从多个 Camera.PictureSourceType 。您必须弹出一个本机/自定义警报,并具有从库或摄像机中选择的选项。

From the answer for the following question I understand that there is no direct solution provided by Cordova to give the user an option to choose from multiple Camera.PictureSourceType. You have to pop a native/custom alert with option to choose from Gallery or Camera.

干杯!

这篇关于如何让用户在Cordova中从Gallery中选择或拍照的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆