resolveLocalFileSystemURI Fehlercode 5, windows phone 7 phonegap

Ich habe versucht diesen umzusetzen, arbeiten rund um
1.Fotos
2.Holen Sie sich das Foto von seinem gespeicherten Ort
3.Lesen Foto als base64

Habe ich folgte dieser Methodik:

var cameraOptions = {};
function capturePhoto() {
    console.log("capture photo");
    cameraOptions = { quality: 70, destinationType: Camera.DestinationType.FILE_URI, sourceType: Camera.PictureSourceType.CAMERA, saveToPhotoAlbum: true };
    doIt();
}
function doIt() {
    navigator.camera.getPicture(onCameraSuccess, onCameraFail, cameraOptions);
}
function onCameraSuccess(imageURI) {
    console.log("Camera Success");

    $('#MokhalfaPhotoLocation').val(imageURI);
    console.log("Image URI: " + imageURI);
    window.resolveLocalFileSystemURI(imageURI, onResolveImageSuccess, onFail); //get the file from the physical path...
}
  function onResolveImageSuccess(fileEntry) {
    fileEntry.file(gotFile, onFail);
}
function gotFile(file) {
    readDataUrl(file);
}
function readDataUrl(file) {
    console.log("read file as dataUrl");
    var reader = new FileReader();
    reader.onloadend = function (evt) {
        console.log("Read as data URL");
        window.localStorage.setItem("mokhalfaPhotoURL", evt.target.result);
 };
    reader.readAsDataURL(file);
}

diese Kette ist fein gearbeitet, bis die CameraSuccess dann ist es ein Fehler in der Zeile

window.resolveLocalFileSystemURI(imageURI, onResolveImageSuccess, onFail);

ging, onFail-Ereignis Mit dem Fehlercode = 5

btw, dieser code funktionierte gut auf Android, aber das Problem hier mit Windows Phone 7
jeder weiß, was ist das problem?

InformationsquelleAutor N0rA | 2013-02-25
Schreibe einen Kommentar