Phonegap - saveToPhotoAlbum不工作

时间:2015-04-07 00:04:10

标签: api cordova camera phonegap-plugins

我正在尝试使用saveToPhotoAlbum : true;将照片保存到我的图库,但它无效。图像保存在应用程序文件夹的缓存中。如何让它出现在图库中?

<script type="text/javascript" charset="utf-8">
        function getCapture(){
            //alert("Hello");
            navigator.camera.getPicture( cameraSuccess, cameraError, { 
                quality : 75,
                destinationType : Camera.DestinationType.DATA_URL,
                saveToPhotoAlbum : true});

        }

        function cameraSuccess(imageData){
            var image = document.getElementById("image");

            image.src = "data:image/jpeg;base64," + imageData;
            alert("success");

        }

        function cameraError(e){
            alert("Camera Error"+e);
        }
    </script>

0 个答案:

没有答案