More convenient base CordovaPlugin class

Usage no npm install needed!

<script type="module">
  import cordovaSupportAndroidPlugin from '';


NPM version NPM downloads Twitter

The plugin introduces new base class for Android Cordova plugins called ReflectiveCordovaPlugin that extends CordovaPlugin and allows to reduce boilerplate code. Please read links below to understand new capabilities:

ProGuard notes

If you obfuscate app with ProGuard then usually contains rules:

-keep class org.apache.cordova.* { *; }
-keep class org.apache.cordova.engine.* { *; }
-keep public class * extends org.apache.cordova.CordovaPlugin

ReflectiveCordovaPlugin uses method names to match an appropriate action. Therefore you should keep names for methods with @CordovaMethod annotation:

-keepclassmembers class ** { *;
-keep public enum$** {
    **[] $VALUES;
    public *;