How can import cordova plugin?

I want to use below cordova plugin in ionic3 project.

So I installed like this

ionic cordova plugin add clovelced-plugin-audiomanagement
npm install --save clovelced-plugin-audiomanagement

I think I installed well. But when I import plugin my code, I can’t use.

import { AudioManagement } from ‘clovelced-plugin-audiomanagement’;

error is can’t find ‘clovelced-plugin-audiomanagement’ module.

what is wrong my code???

Which platform, Android or iOS?

This plugin is for Android.

Android build error.

That’s a Cordova plugin that has no definition file for TypeScript to import it. I have recently completed the definition file that can be seen here. But more to your interest (if you’re still interested) I created an ionic-native PR today for this feature.

I plan to create a mock class for it very soon and plan to submit a PR in ionic-native-mocks