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

4x4 Matrix in Python -

python - String indices must be integers and while issue -

wso2is - WSO2 IS 5.0.0 SP1 After restart there is authentication error -