Newbie question about committing Android Java files into repo

Hi,

In my project I am using the cordova-file-opener2 package and I needed to modify something in the file node_modules\cordova-plugin-file-opener2\src\android\io\github\pwlin\cordova\plugins\fileopener2\FileProvider.java.

If I modify the file after building the app in Android Studio, the changes won’t persist because the file will be reverted whenever I ran ionic cap sync. So to make the update permanent, I will have to modify it directly in the node_modules folder.

Can anyone give me some guidance for committing modified Java source files that originated from Cordova plugins?

Thank you in advance.

So, i’m not a fan of changing stuff in the installed plugin in the node_modules folder. So normally, if you want to change something, it is something usefull? (i hope so). The File Opener Plugin is maintained, so you can create a PR and hope it is merged into the Plugin so you can use it. Alternatively you can fork the Plugin and install it from your own Fork directly via Github