Book Image

JavaScript Mobile Application Development

Book Image

JavaScript Mobile Application Development

Overview of this book

Table of Contents (15 chapters)
JavaScript Mobile Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Start contributing to Mega App


This chapter is all about Mega App; however, Mega App still needs some improvements that you can add to it. They are as follows:

  • Instead of copying the image files to our app directory when a photo is captured using a camera or picked from the device gallery, we can move the picture file completely to avoid file redundancy. In order to do this, we can simply replace file.copyTo() with file.moveTo() in FileManager and change the method name to moveFileToDirectory.

  • Instead of only deleting the file reference in the Local Storage when removing a memo (or memos) as requested by the removeMemo() or removeAllMemos() methods of MemoManager, we can delete the physical files as well using the remove() method of the FileEntry Cordova object and adding this to a new method (deleteFile) of FileManager. The deleteFile() method will be called by the removeMemo() and removeAllMemos() methods to make sure that the memo files are completely removed from the device's filesystem...