cordova - Ionic 2: backgroundMode is never enabled -


i trying make app work in background plugin backgroundmode. however, enable in code, it's never enabled. have imported it. code:

declare var cordova:any;      console.log("started")     document.addeventlistener('deviceready', function () {            console.log("ready")     cordova.plugins.backgroundmode.enable();     if(cordova.plugins.backgroundmode.isenablisactive()==true){         console.log("it works!")     }}, false); 

it prints out started , ready

i have tried follow katzer's guide , solution, none of them worked me.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -