Search code examples
javaandroidcordovaphonegap-pluginsphonegap

can´t edit custom java plugin in Cordova/Phonegap


I installed a custom plugin for my app and want to make a change to it, but it doesn´t seem to take any effect. I can even remove functions or write wrong syntax, but it just remains in the old state.

I tried deleting the local data from the phonegapp developer app in case they are caching these things.

In the config.xml:

<feature name="SocialSharing" >
  <param name="android-package" value="nl.xservices.plugins.SocialSharing"/>
</feature>

I am editing the SocialSharing.java file within platforms\android\src\nl\xservices\plugins. There is no other SocialSharing.java file within the project.


Solution

  • As David said, you should edit the files in the plugin folder, not in the platform folder wich content is replaced each time you build.

    To use modified version of a plugin, I would suggest that instead of modifying it in your project and have to do it again in another project, you just fork the project and then install the plugin from your forked repo.

    Or if you don't want to upload the modified version, you can just click download the plugin from git and then install it in your project by specifying the path in your file system in the cordova plugin add command.