I THINK I have a solution to this, but it's kinda nasty.
I grepped through the cordova JAVA and looked for places it constructed a file entry JSON object. Specifically by looking for places where its adding fullPath
to the object.
I added an additional entry for "fullAbsolutePath" with the value [file].getAbsolutePath()
, where [file]
is whatever java.io.file instance is nearby. I did this in all the places I could find just to be safe and because it doesn't seem to hurt anything.
Then I modified FileEntry.js and File.js in the plugins\file folder to also populate that value to the file entry object.
Still trying to work out the kinks, but I believe I'm on the right track...
I think a better solution would be to modify the inAppBrowser plugin to recognize and resolve the cordovaFile:// protocol and im sure they obscured the absolute file system path on purpose - but that might be a bit beyond me.
EDIT - Yup! this works! I can now take a file entry, call the file method, then read fullSystemPath off the fileObject. Value is like "/storage/emulated/0/whatever/" on my android. Just need to prepend "file://" and window.open will accept it.