Hi,
is it possible to load a file with Cordova from the Internal Storage of an Android device, i.e. a file that is stored the following way:
In JS I have tried to access the directory as follows:
But it doesn't work. I got the error message: "Uncaught ReferenceError: DirectoryEntry is not defined at file:///android_asset/www/index.html:12"
Using the path as a link works:
Is there a way to access the internal storage?
Thank you in advance.
is it possible to load a file with Cordova from the Internal Storage of an Android device, i.e. a file that is stored the following way:
Code:
FileOutputStream fos = openFileOutput(fileName, Context.MODE_PRIVATE);
fos.write(html.getBytes());
fos.close();
In JS I have tried to access the directory as follows:
Code:
var internalStorage = "file:///data/data/myproject/files/"; // also without file://
var dirEntry = new DirectoryEntry({fullPath:internalStorage});
But it doesn't work. I got the error message: "Uncaught ReferenceError: DirectoryEntry is not defined at file:///android_asset/www/index.html:12"
Using the path as a link works:
Code:
<a href="file:///data/data/myproject/files/storedFile.html">Go to stored file</a>
Is there a way to access the internal storage?
Thank you in advance.