How to use a cordon plugin in my ionic 3?

0

I need to implement the following plugin in my ionic application:

link

But I can not call it in my ts file.

I tried something like:

window.plugins.powerManagement();

But I get:

  

property plugins does not exist on type "Window"

Is there any way I can access this plugin?

I've already added it through:

cordova plugin add https://github.com/boltex/cordova-plugin-powermanagement.git

But what now?

    
asked by anonymous 01.11.2018 / 15:03

2 answers

0

For those of you interested, I was able to access the properties of this plugin in the following way:

  (<any>window).powerManagement.dim();
  (<any>window).powerManagement.setReleaseOnPause(false)
    
01.11.2018 / 15:08
-1

The cordova plugins are only accessed through a device ... That is, if you are testing through the browser you will not be able to access it.

In the documentation search for the property ready , I believe it will solve your problem.

    
01.11.2018 / 15:07