Advertisement
Fabbrogas

Untitled

Jun 28th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function capturePhoto() {
  2.     //Take picture using device camera and retrieve image as base64-encoded string
  3.     navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 25,
  4.     destinationType: Camera.DestinationType.FILE_URI, });
  5. }
  6.  
  7. function onPhotoDataSuccess(imageURI) {
  8.     displayPhoto(imageURI);
  9. }
  10.  
  11. function displayPhoto(imageURI){
  12.     capturedPhoto ++;
  13.     document.getElementById('part' + capturedPhoto ).src =  imageURI;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement