Cordova plug-in - what am I am doing wrong?


#1

I am trying to get the cordova plugin “audioinput” working in Ionic 3.8.

In the packagejson file I have the dependency : “cordova-plugin-audioinput”: “^0.3.0”

Built the app for Android and install the app on a device- with a link to chrome to see the debug.

Problem is that the app does not see the plugin - in the window element there should be audioinput.

Any ideas where I am going wrong?

win


#2

Found the answer in this forum - you have to add it to config.xml file as well.


#3

Actually, it should set this dependency itself :thinking:


#4

I think it could have been caused by not using the command line ionic cordova plugin.
I copied the dependencies from an old package.json file into the current app and ran npm install.

I will often start with the blank app and update the src folder and package.json file from an existing app - that way it does not get bloated.

I have not had to use cordova until now - so it has been a bit of learning curve.


#5

well yes, that caused it. good luck furthermore