diff options
author | Struan Donald <struan@exo.org.uk> | 2012-11-15 16:35:17 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-11-15 16:52:43 +0000 |
commit | eb8efce6bf51cbc75068c338c0b886d8a2bad30c (patch) | |
tree | a2844f4ed8284cfc355f76985a21f928a0abb9e2 /www/js | |
parent | 50bf3fee631b4c9bc163108cc8a1b662afeda9aa (diff) |
save photos taken to camera roll
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/mobile.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/www/js/mobile.js b/www/js/mobile.js index f717bd4..e90aea3 100644 --- a/www/js/mobile.js +++ b/www/js/mobile.js @@ -229,7 +229,11 @@ function takePhotoFail(message) { } function takePhoto(type) { - navigator.camera.getPicture(takePhotoSuccess, takePhotoFail, { quality: 50, destinationType: Camera.DestinationType.FILE_URI, sourceType: type }); + var save_to_album = false; + if ( type == navigator.camera.PictureSourceType.CAMERA ) { + save_to_album = true; + } + navigator.camera.getPicture(takePhotoSuccess, takePhotoFail, { saveToPhotoAlbum: save_to_album, quality: 50, destinationType: Camera.DestinationType.FILE_URI, sourceType: type }); } function check_name( name, msg ) { |