Not native plugin wrapper

Hello,

I would like to use : https://github.com/randdusing/cordova-plugin-bluetoothle
The native BLE is not sufficient for my needs.

I doesn’t want to use the plugin directly and want having Promises or Observables.

So i see a tutorial here :http://www.damirscorner.com/blog/posts/20170908-WritingAnIonicNativeWrapper.html
and more informations here https://github.com/ionic-team/ionic-native/blob/master/DEVELOPER.md
Somone even made the wrapper : https://gist.github.com/sublimator/6969bdf0457f7ac809fa90ba600990ee

But it’s not enought for me, i don’t understand where i have to put the wrapper file…

Thanks for you help.

You can place the file with the wrapper anywhere in your folder structure. Reasonable locations are providers/my-wrapper/my-wrapper.ts and plugins/my-wrapper/my-wrapper.ts (I prefer the latter). Don’t forget to add your wrapper to the providers collection of your app module.

-e

1 Like