Closed dunkindohnuts closed 7 years ago
Can you post the code, how you are using, since there has been some changes in the code. please have a look at Readme file also.
This is the code I'm running on an Android device. I've looked on the device and the db file trying to be copied does exist. However, I did notice that if you specify a file which doesn't exist you get the same behaviour, ie the success callback is invoked. The response being passed to the callback is a string and not a JSON object. The response says JSON error.
Thanks
var dbName='test.db'; var dir='test';
window.plugins.sqlDB.copyDbFromStorage(dbName,0,cordova.file.dataDirectory + dir + "/" + dbName,true, function(response){ console.log(response); // This prints out JSON error console.log('dbase installed'); }, function(response){ console.log('error installing database'); }); }
Can you use Android Monitor tool and post the Java log?
Reopen it, if you still facing issue.
Hi,
I'm using copyDbFromStorage to copy a database from a location under cordova.file.dataDirectory but the copy does not work. The success callback is being called with ' JSON error' passed to it.
Thanks