martinkasa / capacitor-secure-storage-plugin

Capacitor plugin for storing string values securly on iOS and Android.
MIT License
155 stars 56 forks source link

register plugin on Android #37

Closed pzontrop closed 2 years ago

pzontrop commented 3 years ago

In the documentation it states to include the plugin in the mainActivity as such:

@Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Initializes the Bridge
    this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
      // Additional plugins you've installed go here
      // Ex: add(TotallyAwesomePlugin.class);
      add(SecureStoragePlugin.class);
    }});
  }

However in the upgrade guide of capacitor 3 it states we no longer need to register plugins that way.

Is it still required to register this plugin in capacitor 3 or not?

martinkasa commented 3 years ago

Thanks, I missed that. I will try it and update the documentation.

Sampath-Lokuge commented 2 years ago

Hi @martinkasa

Please update the doc. It gives an error if we'll add it like so: Running Gradle build - failed! I can see still it is there. Thanks!