Advertisement
Fabbrogas

Untitled

Jun 28th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. // Wait for Cordova to connect with the device
  3. document.addEventListener("deviceready",onDeviceReady3,false);
  4.  
  5. // Cordova is ready to be used!
  6. function onDeviceReady3() {
  7.     pictureSource3=navigator.camera.PictureSourceType;
  8.     destinationType3=navigator.camera.DestinationType;
  9. }
  10.  
  11. //  button will call these functions, get picture from camera
  12. function capturePhoto3() {
  13.     // Take picture
  14.     navigator.camera.getPicture(onPhotoTakenSuccess3, onFail, {
  15.         quality: 50,
  16.         saveToPhotoAlbum: true,
  17.         destinationType3: destinationType3.FILE_URI
  18.     });
  19. }
  20.  
  21. function onPhotoTakenSuccess3(imageURI) {
  22.     //displayPhoto(imageURI);
  23.     capturedPhoto ++;
  24.     document.getElementById('part' + capturedPhoto).src =  imageURI;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement