Meteor JS and Cordova

-1

How can I call native Java methods through Cordova with Meteor? I've tried cordova.exec () declaring plugins, but I do not know exactly where to declare these plugins. I found that I should declare them in the following way, in the config.xml file

 <feature name="namePlugin">
    <param name="android-package" value="name package" />        
</feature>

Besides that, I declared within the android project generated by cordova a class that inherits from CordovaPlugin with their respective methods.

All this without success because every time I try to run the Meteor project it overwrites the config.xml file and removes the plugin's declaration.

I have also edited the android.json file to add the plugin from there without any result

    
asked by Luis Espinel Fuentes 01.12.2016 в 03:12
source

2 answers

0

It is not possible.

Or at least not directly. Cordova can not connect to Java directly.

The way you can do it is by creating a Webservice with Java. And from the application you consume that service.

    
answered by 05.01.2017 в 04:49
0

I think the correct question you should ask is "How to create a plugin for cordova"

If you want to overwrite the config.xml file you have to create a folder called "cordova-build-override" in the top (at the same level as the server or client folders) inside that folder you have to generate the tree of folders until you get to the android config.xml, that file will replace the one generated.

In this link is the official documentation link

And another about creating plugins link

    
answered by 04.02.2017 в 18:34