Phonegap - 给用户选项PictureSourceType [英] Phonegap - give user option of PictureSourceType

查看:185
本文介绍了Phonegap - 给用户选项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按钮解决方案的问题,但我不喜欢建立它,如果我不必。 p>

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屋!

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