Use vendor cordova plugin


I want to use a vendor cordova plugin called AppConnectCordovaConfigPlugin in my ionic project, but it did not work. I got error on my device ACConfigPlugin.testMe() is not a function.
I think perhaps I do not use plugin correctly or the generated package.json is wrong? Please help!!!

Here are my steps:

  1. I copy the folder AppConnectCordovaConfigPlugin in my project.
  2. Because of the fact, that the cordova plugin has no package.json I execute npm init in the plugin folder to build package.json.
  3. Execute ionic cordova plugin add AppConnectCordovaConfigPlugin. Entries are made in my apps config.xml and package.json.
  4. Usage in my code. I add a function into vendor code ACConfigPlugin.js testMe() which returns any value for testing.
declare var ACConfigPlugin: any;
initializeApp() {
    this.platform.ready().then(() => {

Here is the folder structure of vendor plugin


The plugin.xml


 Distributed by MobileIron, Inc.
 Customers and partners may freely copy and re-use.


<?xml version="1.0" encoding="UTF-8"?>

<plugin xmlns=""

        This plugin allows your application to receive app-specific configuration from Core

        <engine name="cordova" version=">=4.1.0" />

    <!-- android -->
    <platform name="android">
        <config-file target="res/xml/config.xml" parent="/*">
            <feature name="ACConfigPlugin">
                <param name="android-package" value="com.mobileiron.cordova.appconnect.ACConfigPlugin"/>
                <param name="onload" value="true" />

        <config-file target="AndroidManifest.xml" parent="/manifest">
            <!-- <uses-sdk android:minSdkVersion="19" /> -->
            <permission android:name="com.mobileiron.CONFIG_PERMISSION" android:protectionLevel="signature" />
            <uses-permission android:name="com.mobileiron.CONFIG_PERMISSION" />

        <config-file target="AndroidManifest.xml" parent="/manifest/application">
            <service android:name="com.mobileiron.cordova.appconnect.AppConnectConfigService"
                <action android:name="com.mobileiron.HANDLE_CONFIG" />

        <js-module src="www/android/ACConfigPlugin.js" name="ACConfigPlugin">
            <clobbers target="ACConfigPlugin" />

        <source-file src="src/android/" target-dir="src/com/mobileiron/cordova/appconnect" />
        <source-file src="src/android/" target-dir="src/com/mobileiron/cordova/appconnect" />



The generated package.json

“name”: “ACConfigPlugin”,
“version”: “1.0.0”,
“description”: “## Description”,
“main”: “index.js”,
“scripts”: {
“test”: “echo “Error: no test specified” && exit 1”
“author”: “”,
“license”: “ISC”