Sorry, I can't login with provided credentials. There is an error in console - Login with wrong password. Sign up and Login with Facebook don't work as well... Could you check if you've posted correct login/password?
Sorry, I can't login with provided credentials. There is an error in console - Login with wrong password. Sign up and Login with Facebook don't work as well... Could you check if you've posted correct login/password?
can you try again with un=appery pass=12341234
Hi Mehmet,
Try the following please:
1) Add this line before calling RequestFileSystem prewindow.RequestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;/pre2) Instead of LocalFileSystem.PERSISTENT use PERSISTENT.
Hi thanks again,
I changed the code like this:
precode
function fail(evt) {
alert(evt);
}
var fileUrl = 'https://api.appery.io/rest/1/db/files/' + deneme_settings['database_id'] +"/"+value + "?sessionToken=" + localStorage.getItem('sessionTokenId');
window.RequestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
window.RequestFileSystem(
/LocalFileSystem./PERSISTENT, 0,
function onFileSystemSuccess(fileSystem) {
fileSystem.root.getFile(
"SureTerms/"+value, {create: false, exclusive: false},
function fileExist(fileEntry){
$("[dsid=pimage]", element.parent()).attr("src", fileEntry.toURL());
Code: Select all
},
function fileDoesNotExist(){
window.RequestFileSystem(
/*LocalFileSystem.*/PERSISTENT, 0,
function onFileSystemSuccess(fileSystem) {
fileSystem.root.getFile(
"dummy.html", {create: true, exclusive: false},
function gotFileEntry(fileEntry){
var sPath = fileEntry.fullPath.replace("dummy.html","");
var fileTransfer = new FileTransfer();
fileEntry.remove();
fileTransfer.download(
fileUrl,
sPath + "SureTerms/"+value,
function(theFile) {
alert("download complete: " + theFile.toURL());
alert(fileEntry.fullPath);
$('[dsid=pimage]', element.parent()).attr('src', theFile.toURI());
},
function(error) {
alert("download error source " + error.source);
aler("download error target " + error.target);
alert("upload error code: " + error.code);
}
);
},
fail);
},
fail);
//fileDoesNotExist
});
},
fail);
/code/pre
and it's not working either.It alerts "File Error.QUOTA_EXCEEDED_ERR" on chrome via desktop. In Safari via desktop and Android device it does not give any alert and not working too.
Hello!
1) You receive preFile Error.QUOTA_EXCEEDED_ERR/prebut you request prewindow.RequestFileSystem(/LocalFileSystem./PERSISTENT, 0,.../pre try to request 10 MB for example prewindow.RequestFileSystem(/LocalFileSystem./PERSISTENT, 1010241024,.../pre
2) Are you sure this functionaliry is supported where yo test it? Check here https://developer.mozilla.org/en-US/d...
I have tried 10MB too and not worked on android.
Funcinality supported according to phonegap.
http://docs.phonegap.com/en/3.3.0/cor...
Still, I am gonna try to change it. thanks for help.
Let us know if you need help.
Hi still not working and i am sure this functionality supported on android.
Because it downloads image to the phone. The problem is about showing files.
As i said before after assigning source if i alert the source it gives some png data as hexa decimal. However it doesn't show in application.
İs there any example code for showing images from local file system of phone in appery? I know appery includes phonegap and things which works on phonegap has to be works on appery but any of the phonegap examples which i tried not working either.
Hi Mehmet,
Please post an example of the image code you get. If it is coded as base64 you can use this approach then:prevar base64 = "url(data:image/png;base64," + yourCode+ ")";
Appery("mobileimage").css("background-image", base64);
Appery("mobileimage").attr("src","");/preWhere 'mobileimage' is an Image component name,
'yourCode' is your image code.
Hi, any of these don't solve the problem. Just please can you give me a simple example code for reading any png file named "a.png" from local file storage on android device and showing it in image component.