I am creating a Phonegap / Cordova application that downloads some files and saves them on the device. For this, I use the file API.
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) { rootPath = fileSystem.root.fullPath; }, fail );
On iOS, this will install rootPath in the applicationโs private directory, which is good. On Android, this will install rootPath in the root folder of the external storage, which is a problem because these files are not attached to the application and are not deleted when the application is deleted. As far as I understand, the correct way to do this on Android would be to use getExternalFilesDir . How can I get getExternalFilesDir functionality via Phonegap?
source share