This chapter is all about Mega App; however, Mega App still needs some improvements that you can add to it. They are as follows:
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
.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.This is a good chance for you to improve Mega App by making these updates. Let's go and download the App source code from GitHub at https://github.com/hazems/cordova-mega-app and start playing with it. You can also download the source code of this chapter from the book page on the Packt Publishing website.
3.137.216.175