1
votes

I have created a custom Cordova plugin locally using Cordova jar and Android studio according to my need.

Previously, I can install it easily on Cordova or Ionic (for older version) application.

Procedure I have done to install plugin:

  1. ionic cordova plugin add plugin < my custom plugin path >
  2. npm install --save @ionic-native/< my_custom_plugin_path >

For older version using step 1 only.

But I am unable to install it in ionic 3 application. Procedure step 2 creates file configuration related issues. And it's not giving proper error for this step.

1
I dont think ionic native will have a wrapper for your custom plugin..Suraj Rao
@SurajRao,But I can see first command execute successfully and place data to its respective position. Mainly 2 step creates consfigurtion related issue.Anil Ravsaheb Ghodake
Yes.. that is the step I am talking about.. ionic-native is a set of wrappers for existing cordova plugins inorder to inject as provider and use in app maintained by ionic. Unless you wrote a wrapper also for it, step 2 will not work. You need to use the plugin directlySuraj Rao
as given in the answer.. depends on your global object nameSuraj Rao
@SurajRao, how I can write wrapper for it? Have you know about it.Anil Ravsaheb Ghodake

1 Answers

0
votes

Maybe you should tell us what doesn't work? To implement a custom cordova plugin you have to do it that way:

(<any>window).plugins.YourPlugin.YourFunction...