Skip to content

Android Plugin initialization #1386

Open
@GitToTheHub

Description

@GitToTheHub

Hi,

when I read the documentation for the Android Plugin initialization the following code is proposed to initialize a plugin:

Plugins should use the initialize method for their start-up logic.

@Override
public void initialize(CordovaInterface cordova, CordovaWebView webView) {
    super.initialize(cordova, webView);
    // your init code here
}

But when I look in the source code of CordovaPlugin#initialize it says that I shouldn't use the initialize method and pluginInitialize instead:

 Called after plugin construction and fields have been initialized.
 Prefer to use pluginInitialize instead since there is no value in
 having parameters on the initialize() function.

Is the documentation outdated?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions