Closed robingenz closed 3 years ago
The guide is a work-in-progress. Currently waiting for final release.
Hey, everything seems to work great with Capacitor 3. There is just one thing missing in the documentation. You renamed the class to PrivacySrcreenPlugin so one now needs to change the import statement and also the registation:
import com.getcapacitor.plugin.privacyscreen.PrivacyScreenPlugin;
public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
registerPlugin(PrivacyScreenPlugin.class);
}
}
Hi, as far as I know Capacitor 3 has "Android Plugin Auto-loading" (see here). So you don't have to register the plugin manually anymore.
This section in the README.md
still refers to Capacitor 2, I will remove it soon.
I didn't test without registering it, but I refer to this section in the upgrade guide: https://capacitorjs.com/docs/v3/updating/3-0#switch-to-automatic-android-plugin-loading
Custom Plugins refers to plug-ins a user builds specifically for an app.
Plugins included in package.json
are registered automatically by the Capacitor CLI.
I tested it again and it works.
Ah ok thank you! And great work with the plugin!
Updating Capacitor to 3.0.
Guide: https://capacitorjs.com/docs/v3/updating/plugins/3-0
New plugin template: https://github.com/ionic-team/create-capacitor-plugin/tree/main/assets/plugin-template