How to add plugins in capacitor android



  • Register the plugin in com.companyname.appname.MainActivity#onCreate

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    
        List<Class<? extends Plugin>> additionalPlugins = new ArrayList<>();
        // Additional plugins you've installed go here
        // Ex: additionalPlugins.add(TotallyAwesomePlugin.class);
        additionalPlugins.add(SmsManagerPlugin.class);
    
        // Initializes the Bridge
        this.init(savedInstanceState, additionalPlugins);
    }

Log in to reply