I am trying to get the Android system photo library to get the image. I have an imageURI variable provided by the navigator.camera.getPicture function. This is normal until then. But later I want to access the photo library and take the base64 code of this image.
Since it is not possible that navigator.camera.getPicture returns both data (imageURI and imageData), I need to get base64 information later. Here is the code I tried to use while looking at the βfileβ phoneGap documentation, but it doesnβt work.
It stops when you call "fileSystem.root.getFile" - (Error in the error callback: File4 = TypeError: The result of the expression "evt.target" [undefined] is not an object. In the file: ///android_asset/www/phonegap-1.3 .0.js: 717)
Who can help me? Thanks.
function base64(imageURI) { alert(imageURI); document.addEventListener("deviceready", onDeviceReady); function onDeviceReady() { window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);} function gotFS(fileSystem) { alert("filesystem");
source share