
Untitled
By: a guest on
May 6th, 2012 | syntax:
None | size: 0.68 KB | hits: 19 | expires: Never
demo.launchCameraWindow=function(winConfig,successCallback,cancelCallback,failureCallback){
//We use our helper functions to create the window
var win = demo.myHelpers.makeWindow(winConfig);
Ti.Media.showCamera({
success:function(event){
var image = event.media;
successCallback(image)
},
cancel:function(){
cancelCallback();
},
error:function(error){
failureCallback(error.code;)
},
saveToPhotoGallery:false,
allowEditing:true,
mediaTypes:[Ti.Media.MEDIA_TYPE_PHOTO]
});
//-------------------------------------------------------------
// Don't forget to return the window
//-------------------------------------------------------------
return win;
};