var options = { quality:50, destinationType:0, sourceType:1, correctOrientation:true}/** * Hook up to a button or element with an onAction event to start the camera * @properties={typeid:24,uuid:"8EEAFB0D-133F-4009-9C41-83B8A890D19B"} */functiononAction$takePicture() {plugins.svyphonegapCamera.getPicture(getPicSuccess, getPicFail, options);}/** * Callback when picture received successfully * @properties={typeid:24,uuid:"8EEAFB0D-133F-4009-9C41-83B8A890D19B"} */functiongetPicFail(err) {//failed to get picture }/** * Callback when picture received successfully * @properties={typeid:24,uuid:"8EEAFB0D-133F-4009-9C41-83B8A890D19B"} */functiongetPicSuccess(res) {//display the image.elements.contact_photo.imageURL ='';elements.contact_photo.text ='<img src="data:image/png;base64,'+ res +'"/>'}