Using the phonegap command :

phonegap build android

an android project was created.

And I want to use the standard plugin cordova-plugin-network-information in this project. Do I need to somehow additionally connect the plugin to the projects, for example, with the command:

phonegap plugin add ...

If in this created project in the config.xml file this plugin already seems to be added:

<?xml version='1.0' encoding='utf-8'?> <widget id="by.example" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0"> <name>MyProject</name> ... <plugin name="cordova-plugin-battery-status" source="npm" spec="~1.1.1" /> <plugin name="cordova-plugin-camera" source="npm" spec="~2.1.1" /> <plugin name="cordova-plugin-media-capture" source="npm" spec="~1.2.0" /> <plugin name="cordova-plugin-console" source="npm" spec="~1.0.2" /> <plugin name="cordova-plugin-contacts" source="npm" spec="~2.0.1" /> <plugin name="cordova-plugin-device" source="npm" spec="~1.1.1" /> <plugin name="cordova-plugin-device-motion" source="npm" spec="~1.2.0" /> <plugin name="cordova-plugin-device-orientation" source="npm" spec="~1.0.2" /> <plugin name="cordova-plugin-dialogs" source="npm" spec="~1.2.0" /> <plugin name="cordova-plugin-file" source="npm" spec="~4.1.1" /> <plugin name="cordova-plugin-file-transfer" source="npm" spec="~1.5.0" /> <plugin name="cordova-plugin-geolocation" source="npm" spec="~2.1.0" /> <plugin name="cordova-plugin-globalization" source="npm" spec="~1.0.3" /> <plugin name="cordova-plugin-inappbrowser" source="npm" spec="~1.3.0" /> <plugin name="cordova-plugin-media" source="npm" spec="~2.2.0" /> <plugin name="cordova-plugin-network-information" source="npm" spec="~1.2.0" /> <plugin name="cordova-plugin-splashscreen" source="npm" spec="~3.2.1" /> <plugin name="cordova-plugin-statusbar" source="npm" spec="~2.1.2" /> <plugin name="cordova-plugin-vibration" source="npm" spec="~2.1.0" /> <plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1" /> ... </widget> 

    1 answer 1

    Verified by experience - after the command

    phonegap plugin add cordova-plugin-network-information

    Received notification that the plugin has already been added to the project:

    enter image description here