问候
function copIEPhoto() {try { var fail = function (err) { alert(err); }; window.resolveLocalfileSystemURI("file:///storage/emulated/0/AndroID/data/com.coolappz.cAPIgo/cache/1427968060754.jpg",function (file) { window.resolveLocalfileSystemURI("file:///test",function (destination) { file.moveto(destination,"test.jpg"); },fail); },fail);} catch (err) { alert("copIE : " + err);}
}
解决方法 经过几个小时的工作,我做到了:function recupImage(imageURI) { window.resolveLocalfileSystemURI(imageURI,copIEPhoto,fail); }function copIEPhoto(fileEntry) { window.requestfileSystem(LocalfileSystem.PERSISTENT,function(fileSys) { fileSys.root.getDirectory("photos2",{create: true,exclusive: false},function(dir) { fileEntry.copyTo(dir,fileEntry.name,oncopySuccess,fail); },fail); },fail); }function oncopySuccess(entry) { alert('image copié dans le chemin : ' + entry.fullPath);}function fail(error) { alert(error.code);}总结
以上是内存溢出为你收集整理的Cordova android无法从缓存目录中复制图像全部内容,希望文章能够帮你解决Cordova android无法从缓存目录中复制图像所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)