I have an application that is basically a appraisal type app. Right now I use window.localStorage to store the descriptive information about the appraisal (the stuff the user types in) by saving my appraisal object to local storage. Using a naming convention I can easily go back through all the appraisals, pull up the stored object and display saved appraisals.
I also allow users to take photos and videos during the appraisal process which right now I am storing as the media files in the PERSISTEN local file system. This has turned out to be a very cumbersome way to go with all the asynchronous calls. And right now I am stuck when I try to send the files contents to my web service because the “window.resolveLocalFileSystemURI(fileURI, gotFileEntry, fail);” call is not working correctly and I can’t retrieve the file. Neither the gotFileEntry or fail methods get called.
I put an alert to display the file URI (“file///var/mobile/Applications/5B1387AC-28CE-46A5-A83D-B91BD7376708/Documents/LOENotepad/Case_14a6d3e4-f008-42de-e4ef-e334e964a808/Subjects/Subject0/DLPhoto.jpg”, for example. I see the alert but the debug alerts in the gotFileEntry and fail never happen indicating to me that nothing is happening.
I also have every function wrapped in a try-catch block and the catch alert is not firing either.
Oh and I can only do this from the phone itself because the simulator will not let me use the PERMANENT local file system.
It would be a little hard to send in a sample.