简体   繁体   中英

How to edit ionic cordova plugin

I want to do small changes in the ionic cordova plugin I use. To be specific I use

 <plugin name="cordova-plugin-mauron85-background-geolocation" spec="2.3.6">

I do NOT want to install new version of this plugin and I do NOT have issues with this plugin.

Everything is fine, I just want to do my own small changes. I found these 3 files, which are the same:

Mobile-App\node_modules\cordova-plugin-mauron85-background-geolocation\android\plugin\src\main\java\com\marianhello\bgloc\LocationService.java
Mobile-App\platforms\android\src\com\marianhello\bgloc\LocationService.java
Mobile-App\plugins\cordova-plugin-mauron85-background-geolocation\android\plugin\src\main\java\com\marianhello\bgloc\LocationService.java

I want to edit method public int onStartCommand() which is (again) in all 3 files.

Question: Which file should I edit?

Why there are the same file multiple times?

And will be changes applied immediately or I need to recompile the plugin?

I do not want to create new version and install/uninstall stuff can I just modify the file and recompile the app?

I ended by editing all 3 files - they are exactly the same so I edit the file once and copy the same content everywhere.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM