Phonegap - give user option of PictureSourceType

自古美人都是妖i 提交于 2019-12-18 09:17:54

问题


just starting out with this:

My PhoneGap app at some point uploads images to a server through a form.

I can get the image from the CAMERA and I can get the image from the PHOTOLIBRARY.

Is there a way of specifying multiple sources for the sourceType: Camera.PictureSourceType or does it only take one at a time.

In other words...

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"

I have no problems building the 2 button solution but i'd hate to build it if I didn't have to.


回答1:


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.



来源:https://stackoverflow.com/questions/11852903/phonegap-give-user-option-of-picturesourcetype

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!