so the idea is to access the iphones camera and take a picture. here is the code i wrote and it works
˜˜˜
function takePicture(x){ Ti.Media.showCamera({ succes:function(e){ if(e.mediaType === Ti.Media.MEDIA_TYPE_PHOTO){ var imageView = Ti.createImageView({ image:e.media, width:Ti.UI.SIZE, heigth:Ti.UI.SIZE, //zIndex:1 }) } }, error:function(e){ Titanium.UI.createAlertDialog({ title:'CM, message:'An error has occured. Please try agains' }).show(); }, cancel: function (e){
},
allowEditing: true,
saveToPhotoGallery: true,
mediaTypes:[Ti.Media.MEDIA_TYPE_PHOTO],
videoQuality: Ti.Media.QUALITY_HIGH
})
}
˜˜˜
i only have 2 questions: 1. how do i add within the photo capturing screen the option to go directly to the photogallery 2. how do i add the option (button) to switch between the front and back camera
if anyone can help me out, i would really appreciate it