Phonegap - 为用户提供 PictureSourceType 选项 [英] Phonegap - give user option of PictureSourceType
问题描述
刚刚开始:
我的 PhoneGap 应用有时会通过表单将图像上传到服务器.
My PhoneGap app at some point uploads images to a server through a form.
我可以从 CAMERA 获取图像,也可以从 PHOTOLIBRARY 获取图像.
I can get the image from the CAMERA and I can get the image from the PHOTOLIBRARY.
有没有办法为 sourceType: Camera.PictureSourceType
指定多个来源,还是一次只需要一个.
Is there a way of specifying multiple sources for the sourceType: Camera.PictureSourceType
or does it only take one at a time.
换句话说……
有没有办法让用户选择他们的 PhoneGap 原生的照片源,或者我是否需要创建自己的 2 个按钮,用户可以在其中选择拍照"或从库中选择照片"
Is there a way to give the user the option of selecting their photo source that is native to PhoneGap or do I need to create my own 2 buttons in which the user can select "Take Photo" or "Select Photo from Library"
我在构建 2 按钮解决方案时没有任何问题,但如果我没有必要,我不想构建它.
I have no problems building the 2 button solution but i'd hate to build it if I didn't have to.
推荐答案
据我所知,没有办法完成你所解释的.您可以在 Phonegap Doc 中看到可能的选项是你提到的两个.我遇到了同样的问题,最后打开了一个对话框让用户选择图片的来源.
As far as I know, there is not a way to accomplish what you are explaining. You can see in the Phonegap Doc that the possible options are the two you mentioned. I faced the same problem and ended up opening a dialog letting the user to choose the source of the picture.
这篇关于Phonegap - 为用户提供 PictureSourceType 选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!