I am developing a Cordova plugin that comes with some data files. I need these files to
What I am currently doing is to define these files in plugin.xml as resource files, like:
<resource-file src="assets/data.xml" target="assets/data.xml"/>
However, I do not know how to open these files in my Android Java code. If I use a File
class to open the file, what path should I use?
Any help is appreciated.
Since no one has answered this question after a few days, and I have not found a solution elsewhere, I am going to post my own workaround here.
I have to admit that this is not a decent solution. It makes the plug-in depend on the app. However, if there is no better solution, this one just works.
Still, if there is a better solution, please post share it here.