It's possible to addapt a Cordova plugin who isn't integrated into Ionic?

I’m trying to do a provider from this plugin, but i don’t see it in Ionic documentation and i’m not pretty sure if it’s too hard make a service from a plugin for someone who is starting with Ionic (almost three months)

This is the plugin, it’s to create a background service even if the app is closed

The plugin creates a global Javascript object that you would use in a normal Cordova app directly in JS.
You can also use this JS object in your normal Typescript.
You only have to make it known with something like this: declare var Object: any; (after your imports)

Thanks for the response, can u give me a easy example? I don’t know where i have to do the import.

Which is that gloval Javascript import?

You install the plugin. Then the global Javascript object is available in your app. You put the line I showed into the .ts file where you want to use that JS object from the plugin. Then you use it in your code.

Ok thanks, but what is the object that is being imported?

Normally you look at the docs of the plugin, whatever they are working with.
But for this one I couldn’t really find docs?
The sample project it would be this: https://github.com/Red-Folder/bgs-sample/blob/master/plugin.xml#L30
So you would make sure cordova can be accessed in your code and then use cordova.plugins.myService like normal JS.

Yes i usually read the docs but with this one i’m facing problems… How can i sure i can acceed to Cordova?

I see that in another examples but in Ionic1, like on this:

Sorry for all the replies

What do you not understand?

If the Cordova plugin defines Foo then you call Foo.whatEverMethodThePluginOffers() in your code.